TinyMCE Django form won't submit.
Pablo Rivera

Pablo Rivera @yelluw

About: I build awesome stuff at Yelluw. My blog --> pablojuan.com

Joined:
Oct 24, 2016

TinyMCE Django form won't submit.

Publish Date: Aug 28 '20
6 1

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.

Comments 1 total

  • Aly
    AlyAug 28, 2020

    Thank you for sharing.

Add comment