[2.0.x] Fixed #28205 -- Doc'd that ModelAdmin.prepopulated_fields only works on add forms.
Backport of 56b364bacc
from master
This commit is contained in:
parent
41009788a0
commit
5630f4e6ac
|
@ -1048,6 +1048,10 @@ subclass::
|
||||||
of the source fields, and then by transforming that result into a valid
|
of the source fields, and then by transforming that result into a valid
|
||||||
slug (e.g. substituting dashes for spaces).
|
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``,
|
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
|
||||||
``OneToOneField``, and ``ManyToManyField`` fields.
|
``OneToOneField``, and ``ManyToManyField`` fields.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue