mirror of
https://github.com/django/django.git
synced 2025-07-23 13:15:32 +00:00
Fixed #28205 -- Doc'd that ModelAdmin.prepopulated_fields only works on add forms.
This commit is contained in:
parent
51d7feff87
commit
56b364bacc
1 changed files with 4 additions and 0 deletions
|
@ -1044,6 +1044,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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue