module documentation
Utility functions.
Function | form |
Create a form instance with the defined initial data. |
Type Variable | T |
Undocumented |
Variable | logger |
Undocumented |
Create a form instance with the defined initial data.
Form fields are typically defined with initial values. And Django's forms allow extracting this initial values from an instance of a form. So, what this helper function does is inspect all fields of a form, extract the initial values, and then creates a new form instance with these initial values.
Any additional keyword arguments are directly passed to the form constructor.