Refs #28205 -- Corrected ModelAdmin.prepopulated_fields docs regarding when they're populated.
This commit is contained in:
parent
dcd1025f4c
commit
682cdf6cab
|
@ -1067,9 +1067,9 @@ subclass::
|
||||||
slug (e.g. substituting dashes for spaces; lowercasing ASCII letters; and
|
slug (e.g. substituting dashes for spaces; lowercasing ASCII letters; and
|
||||||
removing various English stop words such as 'a', 'an', 'as', and similar).
|
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
|
Prepopulated fields aren't modified by JavaScript after a value has been
|
||||||
undesired that slugs change after an object is created (which would cause
|
saved. It's usually undesired that slugs change (which would cause an
|
||||||
an object's URL to change if the slug is used in it).
|
object's URL to change if the slug is used in it).
|
||||||
|
|
||||||
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
|
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
|
||||||
``OneToOneField``, and ``ManyToManyField`` fields.
|
``OneToOneField``, and ``ManyToManyField`` fields.
|
||||||
|
|
Loading…
Reference in New Issue