[2.1.x] Fixed #16995 -- Clarified interaction of initial and extra with model formsets.
Backport of 28dac56aed
from master
This commit is contained in:
parent
1853e2dbf2
commit
24b3aa0275
1
AUTHORS
1
AUTHORS
|
@ -521,6 +521,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
Mario Gonzalez <gonzalemario@gmail.com>
|
Mario Gonzalez <gonzalemario@gmail.com>
|
||||||
Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
||||||
Mark Biggers <biggers@utsl.com>
|
Mark Biggers <biggers@utsl.com>
|
||||||
|
Mark Gensler <mark.gensler@protonmail.com>
|
||||||
mark@junklight.com
|
mark@junklight.com
|
||||||
Mark Lavin <markdlavin@gmail.com>
|
Mark Lavin <markdlavin@gmail.com>
|
||||||
Mark Sandstrom <mark@deliciouslynerdy.com>
|
Mark Sandstrom <mark@deliciouslynerdy.com>
|
||||||
|
|
|
@ -877,8 +877,10 @@ As with regular formsets, it's possible to :ref:`specify initial data
|
||||||
parameter when instantiating the model formset class returned by
|
parameter when instantiating the model formset class returned by
|
||||||
:func:`~django.forms.models.modelformset_factory`. However, with model
|
:func:`~django.forms.models.modelformset_factory`. However, with model
|
||||||
formsets, the initial values only apply to extra forms, those that aren't
|
formsets, the initial values only apply to extra forms, those that aren't
|
||||||
attached to an existing model instance. If the extra forms with initial data
|
attached to an existing model instance. If the length of ``initial`` exceeds
|
||||||
aren't changed by the user, they won't be validated or saved.
|
the number of extra forms, the excess initial data is ignored. If the extra
|
||||||
|
forms with initial data aren't changed by the user, they won't be validated or
|
||||||
|
saved.
|
||||||
|
|
||||||
.. _saving-objects-in-the-formset:
|
.. _saving-objects-in-the-formset:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue