[2.1.x] Refs #28205 -- Corrected ModelAdmin.prepopulated_fields docs regarding when they're populated.

Backport of 682cdf6cab from master.
This commit is contained in:
Tim Graham 2018-11-28 13:57:30 -05:00
parent 7e9d5a0aca
commit a9d9680ea3
1 changed files with 3 additions and 3 deletions

View File

@ -1067,9 +1067,9 @@ subclass::
slug (e.g. substituting dashes for spaces; lowercasing ASCII letters; and
removing various English stop words such as 'a', 'an', 'as', and similar).
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 aren't modified by JavaScript after a value has been
saved. It's usually undesired that slugs change (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.