1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +00:00

Fixed #16995 -- Clarified interaction of initial and extra with model formsets.

This commit is contained in:
melipone 2018-09-06 12:00:45 +01:00 committed by Tim Graham
parent 34d6bceec4
commit 28dac56aed
2 changed files with 5 additions and 2 deletions

View File

@ -525,6 +525,7 @@ answer newbie questions, and generally made Django that much better:
Mario Gonzalez <gonzalemario@gmail.com>
Mariusz Felisiak <felisiak.mariusz@gmail.com>
Mark Biggers <biggers@utsl.com>
Mark Gensler <mark.gensler@protonmail.com>
mark@junklight.com
Mark Lavin <markdlavin@gmail.com>
Mark Sandstrom <mark@deliciouslynerdy.com>

View File

@ -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
:func:`~django.forms.models.modelformset_factory`. However, with model
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
aren't changed by the user, they won't be validated or saved.
attached to an existing model instance. If the length of ``initial`` exceeds
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: