summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotond Beres <botondus@gmail.com>2017-10-27 16:23:40 +0100
committerTim Graham <timograham@gmail.com>2017-10-28 13:28:46 -0400
commit5630f4e6acba6359d7d182de034a6af563025df9 (patch)
tree075e6689e1e7ebff0fad72e3d0c33877a6a8a97a
parent41009788a0a73d7a33e102efc5d10208f5174964 (diff)
[2.0.x] Fixed #28205 -- Doc'd that ModelAdmin.prepopulated_fields only works on add forms.
Backport of 56b364bacca0d6a6cd8fbcd93aeb49f3ad46e58c from master
-rw-r--r--docs/ref/contrib/admin/index.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index adbd18ef74..8f729bee62 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1048,6 +1048,10 @@ subclass::
of the source fields, and then by transforming that result into a valid
slug (e.g. substituting dashes for spaces).
+ Fields are prepopulated on add forms but not on change forms. It's usually
+ undesired that slugs change after an object is created (which would cause
+ an object's URL to change if the slug is used in it).
+
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
``OneToOneField``, and ``ManyToManyField`` fields.