How do I make certain fields in a ModelForm required=False?
If I have:
class ThatForm(ModelForm):
class Meta:
widgets = {"text": Textarea(required=False)}
Or if I have:
class ThatForm(ModelForm):
text = Textarea(required=False)
Django returns:
__init__() got an unexpected keyword argument 'required'
TextArea
, you have to use an ancestor ofField
, probably the one calledCharField
and add aTextArea
widget – Deceitful