inlineformset_factory(parent_model, model, form=ModelForm, formset=BaseInlineFormSet, fk_name=None, fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None, widgets=None, validate_max=False, localized_fields=None, labels=None, help_texts=None, error_messages=None, min_num=None, validate_min=False, field_classes=None)
[source]
Returns an InlineFormSet
using modelformset_factory()
with defaults of formset=
BaseInlineFormSet
, can_delete=True
, and extra=3
.
If your model has more than one ForeignKey
to the parent_model
, you must specify a fk_name
.
See Inline formsets for example usage.
New in Django 1.9:
The field_classes
keyword argument was added.
Please login to continue.