class BaseModelFormSet(BaseFormSet): (source)
Known subclasses: django.contrib.contenttypes.forms.BaseGenericInlineFormSet
, django.forms.models.BaseInlineFormSet
A ``FormSet`` for editing a queryset and/or adding new objects to it.
Method | __init__ |
Undocumented |
Method | add |
Add a hidden field for the object's primary key. |
Method | clean |
Hook for doing any extra formset-wide cleaning after Form.clean() has been called on every form. Any ValidationError raised by this method will not be associated with a particular form; it will be accessible via formset... |
Method | delete |
Deletes an existing model instance. |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | initial |
Return the number of forms that are required in this FormSet. |
Method | save |
Save model instances for every form, adding and changing instances as necessary, and return the list of instances. |
Method | save |
Save and return an existing model instance for the given form. |
Method | save |
Undocumented |
Method | save |
Save and return a new model instance for the given form. |
Method | save |
Undocumented |
Method | validate |
Undocumented |
Class Variable | edit |
Undocumented |
Class Variable | model |
Undocumented |
Class Variable | unique |
Undocumented |
Instance Variable | changed |
Undocumented |
Instance Variable | deleted |
Undocumented |
Instance Variable | initial |
Undocumented |
Instance Variable | new |
Undocumented |
Instance Variable | queryset |
Undocumented |
Instance Variable | save |
Undocumented |
Instance Variable | saved |
Undocumented |
Method | _construct |
Instantiate and return the i-th form instance in a formset. |
Method | _existing |
Undocumented |
Method | _get |
If the field is a related field, fetch the concrete field's (that is, the ultimate pointed-to field's) to_python. |
Instance Variable | _object |
Undocumented |
Instance Variable | _pk |
Undocumented |
Instance Variable | _queryset |
Undocumented |
Inherited from BaseFormSet
:
Class Method | get |
Undocumented |
Class Method | get |
Undocumented |
Class Method | get |
Undocumented |
Method | __bool__ |
Return True since all formsets have a management form which is not included in the length. |
Method | __getitem__ |
Return the form at the given index, based on the rendering order. |
Method | __iter__ |
Yield the forms in the order they should be rendered. |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | add |
Undocumented |
Method | full |
Clean all of self.data and populate self._errors and self._non_form_errors. |
Method | get |
Undocumented |
Method | get |
Return additional keyword arguments for each individual formset form. |
Method | has |
Return True if data in any form differs from initial. |
Method | is |
Return True if the formset needs to be multipart, i.e. it has FileInput, or False otherwise. |
Method | is |
Return True if every form in self.forms is valid. |
Method | non |
Return an ErrorList of errors that aren't associated with a particular form -- i.e., from formset.clean(). Return an empty ErrorList if there are none. |
Method | total |
Return the number of errors across all forms in the formset. |
Method | total |
Return the total number of forms in this FormSet. |
Class Variable | default |
Undocumented |
Class Variable | template |
Undocumented |
Class Variable | template |
Undocumented |
Class Variable | template |
Undocumented |
Class Variable | template |
Undocumented |
Instance Variable | auto |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | files |
Undocumented |
Instance Variable | form |
Undocumented |
Instance Variable | initial |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | prefix |
Undocumented |
Property | cleaned |
Return a list of form.cleaned_data dicts for every form in self.forms. |
Property | deleted |
Return a list of forms that have been marked for deletion. |
Property | empty |
Undocumented |
Property | errors |
Return a list of form.errors for every form in self.forms. |
Property | extra |
Return a list of all the extra forms in this formset. |
Property | forms |
Instantiate forms at first property access. |
Property | initial |
Return a list of all the initial forms in this formset. |
Property | management |
Return the ManagementForm instance for this FormSet. |
Property | media |
Undocumented |
Property | ordered |
Return a list of form in the order specified by the incoming data. Raise an AttributeError if ordering is not allowed. |
Property | template |
Undocumented |
Method | _should |
Return whether or not the form was marked for deletion. |
Instance Variable | _errors |
Undocumented |
Instance Variable | _non |
Undocumented |
Inherited from RenderableFormMixin
(via BaseFormSet
):
Method | as |
Render as <div> elements. |
Method | as |
Render as <p> elements. |
Method | as |
Render as <tr> elements excluding the surrounding <table> tag. |
Method | as |
Render as <li> elements excluding the surrounding <ul> tag. |
Inherited from RenderableMixin
(via BaseFormSet
, RenderableFormMixin
):
Method | render |
Undocumented |
django.contrib.contenttypes.forms.BaseGenericInlineFormSet
, django.forms.models.BaseInlineFormSet
Undocumented
django.forms.models.BaseInlineFormSet
Add a hidden field for the object's primary key.
django.forms.formsets.BaseFormSet.clean
Hook for doing any extra formset-wide cleaning after Form.clean() has been called on every form. Any ValidationError raised by this method will not be associated with a particular form; it will be accessible via formset.non_form_errors()
django.contrib.contenttypes.forms.BaseGenericInlineFormSet
, django.forms.models.BaseInlineFormSet
Return the number of forms that are required in this FormSet.
Save model instances for every form, adding and changing instances as necessary, and return the list of instances.
django.contrib.contenttypes.forms.BaseGenericInlineFormSet
, django.forms.models.BaseInlineFormSet
Save and return a new model instance for the given form.
django.forms.models.BaseInlineFormSet
Instantiate and return the i-th form instance in a formset.