mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
Thanks to jwa for the report.
This commit is contained in:
parent
219d928852
commit
70ec4d776e
5 changed files with 228 additions and 6 deletions
|
@ -199,11 +199,23 @@ The following checks are performed on any
|
|||
inline on a :class:`~django.contrib.admin.ModelAdmin`.
|
||||
|
||||
* **admin.E201**: Cannot exclude the field ``<field name>``, because it is the foreign key to the parent model ``%s.%s``.
|
||||
* **admin.E202**: ``<model>`` has more than one ForeignKey to ``<parent model>``.
|
||||
* **admin.E202**: ``<model>`` has no ForeignKey to ``<parent model>``./``<model>`` has more than one ForeignKey to ``<parent model>``.
|
||||
* **admin.E203**: The value of ``extra`` must be an integer.
|
||||
* **admin.E204**: The value of ``max_num`` must be an integer.
|
||||
* **admin.E205**: The value of ``formset`` must inherit from ``BaseModelFormSet``.
|
||||
|
||||
GenericInlineModelAdmin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following checks are performed on any
|
||||
:class:`~django.contrib.contenttypes.admin.GenericInlineModelAdmin` that is
|
||||
registered as an inline on a :class:`~django.contrib.admin.ModelAdmin`.
|
||||
|
||||
* **admin.E301**: 'ct_field' references ``<label>``, which is not a field on ``<model>``.
|
||||
* **admin.E302**: 'ct_fk_field' references ``<label>``, which is not a field on ``<model>``.
|
||||
* **admin.E303**: ``<model>`` has no GenericForeignKey.
|
||||
* **admin.E304**: ``<model>`` has no GenericForeignKey using content type field ``<field name>`` and object ID field ``<field name>``.
|
||||
|
||||
|
||||
Auth
|
||||
----
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue