modelform_factory(model, form=ModelForm, fields=None, exclude=None, formfield_callback=None, widgets=None, localized_fields=None, labels=None, help_texts=None, error_messages=None, field_classes=None) [source]
Returns a ModelForm class for the given model. You can optionally pass a form argument to use as a starting point for constructing the ModelForm.
fields is an optional list of field names. If provided, only the named fields will be included in the returned fields.
exclude is an optiona