summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJay Leadbetter <jay.leadbetter@gmail.com>2013-11-14 19:26:19 -0700
committerTim Graham <timograham@gmail.com>2013-11-25 20:01:16 -0500
commitc74504c2dd21974571ab72805fbfc8d4d76ce151 (patch)
treedf8996aa78b584d2d467f06849d71a5b0205c685 /docs
parent1c7a83ee8e3da431d9d21dae42da8f1f89973f7c (diff)
Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.
Updated ModelAdmin to use form.instance when passing parent model to child inlines for add_view. There is effectively no change in the change_view since the previously passed 'obj' is the same as form.instance. Thanks to meshy for report, and EvilDMP and timo for review.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 3313f99250..efd72f58db 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1870,6 +1870,12 @@ The ``InlineModelAdmin`` class adds:
through to :func:`~django.forms.models.inlineformset_factory` when
creating the formset for this inline.
+.. warning::
+ When writing custom validation for ``InlineModelAdmin`` forms, be cautious
+ of writing validation that relies on features of the parent model. If the
+ parent model fails to validate, it may be left in an inconsistent state as
+ described in the warning in :ref:`validation-on-modelform`.
+
.. attribute:: InlineModelAdmin.extra
This controls the number of extra forms the formset will display in