class documentation

A ``FormSet`` for editing a queryset and/or adding new objects to it.

Method __init__ Undocumented
Method add_fields 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_existing Deletes an existing model instance.
Method get_date_error_message Undocumented
Method get_form_error Undocumented
Method get_queryset Undocumented
Method get_unique_error_message Undocumented
Method initial_form_count 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_existing Save and return an existing model instance for the given form.
Method save_existing_objects Undocumented
Method save_new Save and return a new model instance for the given form.
Method save_new_objects Undocumented
Method validate_unique Undocumented
Class Variable edit_only Undocumented
Class Variable model Undocumented
Class Variable unique_fields Undocumented
Instance Variable changed_objects Undocumented
Instance Variable deleted_objects Undocumented
Instance Variable initial_extra Undocumented
Instance Variable new_objects Undocumented
Instance Variable queryset Undocumented
Instance Variable save_m2m Undocumented
Instance Variable saved_forms Undocumented
Method _construct_form Instantiate and return the i-th form instance in a formset.
Method _existing_object Undocumented
Method _get_to_python 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_dict Undocumented
Instance Variable _pk_field Undocumented
Instance Variable _queryset Undocumented

Inherited from BaseFormSet:

Class Method get_default_prefix Undocumented
Class Method get_deletion_widget Undocumented
Class Method get_ordering_widget 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_prefix Undocumented
Method full_clean Clean all of self.data and populate self._errors and self._non_form_errors.
Method get_context Undocumented
Method get_form_kwargs Return additional keyword arguments for each individual formset form.
Method has_changed Return True if data in any form differs from initial.
Method is_multipart Return True if the formset needs to be multipart, i.e. it has FileInput, or False otherwise.
Method is_valid Return True if every form in self.forms is valid.
Method non_form_errors 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_error_count Return the number of errors across all forms in the formset.
Method total_form_count Return the total number of forms in this FormSet.
Class Variable default_error_messages Undocumented
Class Variable template_name_div Undocumented
Class Variable template_name_p Undocumented
Class Variable template_name_table Undocumented
Class Variable template_name_ul Undocumented
Instance Variable auto_id Undocumented
Instance Variable data Undocumented
Instance Variable error_class Undocumented
Instance Variable error_messages Undocumented
Instance Variable files Undocumented
Instance Variable form_kwargs Undocumented
Instance Variable initial Undocumented
Instance Variable is_bound Undocumented
Instance Variable prefix Undocumented
Property cleaned_data Return a list of form.cleaned_data dicts for every form in self.forms.
Property deleted_forms Return a list of forms that have been marked for deletion.
Property empty_form Undocumented
Property errors Return a list of form.errors for every form in self.forms.
Property extra_forms Return a list of all the extra forms in this formset.
Property forms Instantiate forms at first property access.
Property initial_forms Return a list of all the initial forms in this formset.
Property management_form Return the ManagementForm instance for this FormSet.
Property media Undocumented
Property ordered_forms Return a list of form in the order specified by the incoming data. Raise an AttributeError if ordering is not allowed.
Property template_name Undocumented
Method _should_delete_form Return whether or not the form was marked for deletion.
Instance Variable _errors Undocumented
Instance Variable _non_form_errors Undocumented

Inherited from RenderableFormMixin (via BaseFormSet):

Method as_div Render as <div> elements.
Method as_p Render as <p> elements.
Method as_table Render as <tr> elements excluding the surrounding <table> tag.
Method as_ul Render as <li> elements excluding the surrounding <ul> tag.

Inherited from RenderableMixin (via BaseFormSet, RenderableFormMixin):

Method render Undocumented
def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, queryset=None, *, initial=None, **kwargs): (source)
def add_fields(self, form, index): (source)

Add a hidden field for the object's primary key.

def clean(self): (source)

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()

def delete_existing(self, obj, commit=True): (source)

Deletes an existing model instance.

def get_date_error_message(self, date_check): (source)

Undocumented

def get_form_error(self): (source)

Undocumented

def get_queryset(self): (source)

Undocumented

def get_unique_error_message(self, unique_check): (source)

Undocumented

def initial_form_count(self): (source)
def save(self, commit=True): (source)

Save model instances for every form, adding and changing instances as necessary, and return the list of instances.

def save_existing(self, form, instance, commit=True): (source)

Save and return an existing model instance for the given form.

def save_existing_objects(self, commit=True): (source)

Undocumented

def save_new(self, form, commit=True): (source)

Save and return a new model instance for the given form.

def save_new_objects(self, commit=True): (source)

Undocumented

def validate_unique(self): (source)

Undocumented

edit_only: bool = (source)

Undocumented

Undocumented

unique_fields = (source)

Undocumented

changed_objects: list = (source)

Undocumented

deleted_objects: list = (source)

Undocumented

initial_extra = (source)

Undocumented

new_objects: list = (source)

Undocumented

queryset = (source)

Undocumented

save_m2m = (source)

Undocumented

saved_forms: list = (source)

Undocumented

def _construct_form(self, i, **kwargs): (source)

Instantiate and return the i-th form instance in a formset.

def _existing_object(self, pk): (source)

Undocumented

def _get_to_python(self, field): (source)

If the field is a related field, fetch the concrete field's (that is, the ultimate pointed-to field's) to_python.

_object_dict = (source)

Undocumented

_pk_field = (source)

Undocumented

_queryset = (source)

Undocumented