TinyMCE Django form won't submit.

yelluw

Pablo Rivera

Posted on August 28, 2020

TinyMCE Django form won't submit.

I'm building a django application that uses TinyMCE. Forms that had the TinyMCE widget were not submitting.

My models were:

    title = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255)
    content = models.TextField()

The problem is that in order to use TinyMCE you have to change any TextFields to include blank=True.

Your code would end up like so:

    title = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255)
    content = models.TextField(blank=True)

I was using a ModelForm which inherits certain properties from the model.

PS. Spent 2 hours with this. Hope I saved you as much time.

💖 💪 🙅 🚩
yelluw
Pablo Rivera

Posted on August 28, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

TinyMCE Django form won't submit.
tinymce TinyMCE Django form won't submit.

August 28, 2020