mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #27377 -- Clarified that prepopulated_fields doesn't work with OneToOneField.
This commit is contained in:
parent
3e43d24ad3
commit
6af23a4521
6 changed files with 19 additions and 6 deletions
|
@ -343,8 +343,8 @@ with the admin site:
|
|||
* **admin.E027**: The value of ``prepopulated_fields`` refers to
|
||||
``<field name>``, which is not an attribute of ``<model>``.
|
||||
* **admin.E028**: The value of ``prepopulated_fields`` refers to
|
||||
``<field name>``, which must not be a ``DateTimeField``, a ``ForeignKey``, or a
|
||||
``ManyToManyField`` field.
|
||||
``<field name>``, which must not be a ``DateTimeField``, a ``ForeignKey``,
|
||||
a ``OneToOneField``, or a ``ManyToManyField`` field.
|
||||
* **admin.E029**: The value of ``prepopulated_fields[<field name>]`` must be a
|
||||
list or tuple.
|
||||
* **admin.E030**: The value of ``prepopulated_fields`` refers to
|
||||
|
|
|
@ -1059,7 +1059,7 @@ subclass::
|
|||
slug (e.g. substituting dashes for spaces).
|
||||
|
||||
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
|
||||
nor ``ManyToManyField`` fields.
|
||||
``OneToOneField``, and ``ManyToManyField`` fields.
|
||||
|
||||
.. attribute:: ModelAdmin.preserve_filters
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue