ModelForm
No overview available.
Constructor
Signature
def ModelForm() - > null
Signature
def ModelForm(
data: dict = None,
files: dict = None,
auto_id: str = 'id_%s',
prefix: str = None,
initial: dict = None,
error_class: type = ErrorList,
label_suffix: str = None,
empty_permitted: bool = False,
instance: object = None,
use_required_attribute: bool = None,
renderer: object = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| data | dict = None | A dictionary-like object containing the submitted form data to be validated. |
| files | dict = None | A dictionary-like object containing uploaded file data. |
| auto_id | str = 'id_%s' | The format string used to generate HTML ID attributes for form fields. |
| prefix | str = None | A string used to prefix every HTML field name to allow multiple forms on the same page. |
| initial | dict = None | A dictionary of initial values to populate the form fields before user input. |
| error_class | type = ErrorList | The class used to represent and render form validation errors. |
| label_suffix | str = None | The character or string to append after every field label when rendered. |
| empty_permitted | bool = False | A flag indicating whether the form can be submitted with no data without raising validation errors. |
| instance | object = None | An existing model instance to be updated by the form; if provided, the form will be pre-populated with its data. |
| use_required_attribute | bool = None | Whether to include the 'required' HTML attribute on supported form widgets. |
| renderer | object = None | The engine used to render the form into HTML templates. |