summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormelipone <mark.gensler@gmail.com>2018-09-06 12:00:45 +0100
committerTim Graham <timograham@gmail.com>2018-09-10 15:56:45 -0400
commit24b3aa0275717029f658906c6fbc2e8fec28949e (patch)
treeeb8e78d499fb714592f30d4910972a3db9398ed3
parent1853e2dbf2e290ec04e3389d523bbe4bad94a42e (diff)
[2.1.x] Fixed #16995 -- Clarified interaction of initial and extra with model formsets.
Backport of 28dac56aed1c8c9923b52a1ac3606996f9820b30 from master
-rw-r--r--AUTHORS1
-rw-r--r--docs/topics/forms/modelforms.txt6
2 files changed, 5 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 0fda2cf1ec..dd7d7a2081 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -521,6 +521,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>
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index 270b88ff67..0bd7833967 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -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: