[Answered ]-Getting "This field is required" error even though I set null=True and blank=True

2👍

The reason for this, is because you’re overriding the default model field. Both content and title.

Although, content can be nullable when stored in your database, it is required by your form (content = forms.CharField(widget=PagedownWidget)).

Change to content = forms.CharField(widget=PagedownWidget, required=False) to make it optional on form submission.

👤nik_m

Leave a comment