mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).
This partially reverts 983c158da7
This commit is contained in:
parent
a3db480393
commit
384f89f8f8
5 changed files with 20 additions and 15 deletions
|
@ -312,7 +312,7 @@ with the admin site:
|
|||
``fields``.
|
||||
* **admin.E012**: There are duplicate field(s) in ``fieldsets[n][1]``.
|
||||
* **admin.E013**: ``fields[n]/fieldsets[n][m]`` cannot include the
|
||||
many-to-many field ``<field name>``, because that field manually specifies a
|
||||
``ManyToManyField`` ``<field name>``, because that field manually specifies a
|
||||
relationship model.
|
||||
* **admin.E014**: The value of ``exclude`` must be a list or tuple.
|
||||
* **admin.E015**: The value of ``exclude`` contains duplicate field(s).
|
||||
|
@ -336,8 +336,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 foreign key or a
|
||||
many-to-many field.
|
||||
``<field name>``, which must not be a ``DateTimeField``, a ``ForeignKey``, 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
|
||||
|
@ -371,7 +371,7 @@ with the admin site:
|
|||
which is not a callable, an attribute of ``<ModelAdmin class>``, or an
|
||||
attribute or method on ``<model>``.
|
||||
* **admin.E109**: The value of ``list_display[n]`` must not be a
|
||||
many-to-many field.
|
||||
``ManyToManyField`` field.
|
||||
* **admin.E110**: The value of ``list_display_links`` must be a list, a tuple,
|
||||
or ``None``.
|
||||
* **admin.E111**: The value of ``list_display_links[n]`` refers to ``<label>``,
|
||||
|
|
|
@ -61,3 +61,7 @@ Bugfixes
|
|||
|
||||
* Fixed ``contrib.admindocs`` crash when a view is in a class, such as some of
|
||||
the admin views (:ticket:`27018`).
|
||||
|
||||
* Reverted a few admin checks that checked ``field.many_to_many`` back to
|
||||
``isinstance(field, models.ManyToManyField)`` since it turned out the checks
|
||||
weren't suitable to be generalized like that (:ticket:`26998`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue