You can use the field_args
argument of model_form
to override settings for specific fields. You can set everything from the label to the validators. It accepts any valid argument for Field.__init__()
, including the widget.
MyForm = model_form(MyModel, base_class=Form, field_args={
'description': {'widget': TextArea()},
})
If you want to see what else you can override, take a look at the source for Field
.