* **models.E001**: ``<swappable>`` is not of the form ``app_label.app_name``.
* **models.E002**: ``<SETTING>`` references ``<model>``, which has not been installed, or is abstract.
* **models.E003**: The model has two many-to-many relations through the intermediate model ``%s.%s``.
* **models.E004**: ``id`` can only be used as a field name if the field also sets ``primary_key=True``.
* **models.E005**: The field ``<field name>`` from parent model <model> clashes with the field ``<field name>`` from parent model <model>.
* **models.E006**: The field clashes with the field ``<field name>`` from model <model>.
* **models.E007**: Field ``<field name>`` has column name ``<column name>`` that is used by another field.
* **models.E008**: ``index_together`` must be a list or tuple.
* **models.E009**: All ``index_together`` elements must be lists or tuples.
* **models.E010**: ``unique_together`` must be a list or tuple.
* **models.E011**: All ``unique_together`` elements must be lists or tuples.
* **models.E012**: ``index_together/unique_together`` refers to the non-existent field ``<field name>``.
* **models.E013**: ``index_together/unique_together`` refers to a ManyToManyField ``<field name>``, but ManyToManyFields are not supported for that option.
* **models.E014**: ``ordering`` must be a tuple or list (even if you want to order by only one field).
* **models.E015**: ``ordering`` refers to the non-existent field ``<field name>``.
* **fields.E333**: The model is used as an intermediate model by ``<model>``, but it has more than two foreign keys to ``<model>``, which is ambiguous. You must specify which two foreign keys Django should use via the through_fields keyword argument.
* **fields.E334**: The model is used as an intermediate model by ``<model>``, but it has more than one foreign key from ``<model>``, which is ambiguous. You must specify which foreign key Django should use via the through_fields keyword argument.
* **fields.E335**: The model is used as an intermediate model by ``<model>``, but it has more than one foreign key to ``<model>``, which is ambiguous. You must specify which foreign key Django should use via the through_fields keyword argument.
* **fields.E336**: The model is used as an intermediary model by ``<model>``, but it does not have foreign key to ``<model>`` or ``<model>``.
* **fields.E337**: Field specifies ``through_fields`` but does not provide the names of the two link fields that should be used for the relation through ``<model>``.
* **fields.E338**: The intermediary model ``<through model>`` has no field ``<field name>``.
* **fields.E339**: ``<model>.<field name>`` is not a foreign key to ``<model>``.
:class:`~django.contrib.admin.ModelAdmin` (or subclass) that is registered
with the admin site:
* **admin.E001**: The value of ``raw_id_fields`` must be a list or tuple.
* **admin.E002**: The value of ``raw_id_fields[n]`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E003**: The value of ``raw_id_fields[n]`` must be a ForeignKey or ManyToManyField.
* **admin.E004**: The value of ``fields`` must be a list or tuple.
* **admin.E005**: Both ``fieldsets`` and ``fields`` are specified.
* **admin.E006**: The value of ``fields`` contains duplicate field(s).
* **admin.E007**: The value of ``fieldsets`` must be a list or tuple.
* **admin.E008**: The value of ``fieldsets[n]`` must be a list or tuple.
* **admin.E009**: The value of ``fieldsets[n]`` must be of length 2.
* **admin.E010**: The value of ``fieldsets[n][1]`` must be a dictionary.
* **admin.E011**: The value of ``fieldsets[n][1]`` must contain the key ``fields``.
* **admin.E012**: There are duplicate field(s) in ``fieldsets[n][1]``
* **admin.E013**: ``fields[n]/fieldsets[n][m]`` cannot include the 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).
* **admin.E016**: The value of ``form`` must inherit from ``BaseModelForm``.
* **admin.E017**: The value of ``filter_vertical`` must be a list or tuple.
* **admin.E018**: The value of ``filter_horizontal`` must be a list or tuple.
* **admin.E019**: The value of ``filter_vertical[n]/filter_vertical[n]`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E020**: The value of ``filter_vertical[n]/filter_vertical[n]`` must be a ManyToManyField.
* **admin.E021**: The value of ``radio_fields`` must be a dictionary.
* **admin.E022**: The value of ``radio_fields`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E023**: The value of ``radio_fields`` refers to ``<field name>``, which is not a ForeignKey, and does not have a ``choices`` definition.
* **admin.E024**: The value of ``radio_fields[<field name>]`` must be either admin.HORIZONTAL nor admin.VERTICAL.
* **admin.E025**: The value of ``view_on_site`` must be either a callable or a boolean value.
* **admin.E026**: The value of ``prepopulated_fields`` must be a dictionary.
* **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, ForeignKey or ManyToManyField.
* **admin.E029**: The value of ``prepopulated_fields[<field name>]`` must be a list or tuple.
* **admin.E030**: The value of ``prepopulated_fields`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E031**: The value of ``ordering`` must be a list or tuple.
* **admin.E032**: The value of ``ordering`` has the random ordering marker ``?``, but contains other fields as well.
* **admin.E033**: The value of ``ordering`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E034**: The value of ``readonly_fields`` must be a list or tuple.
* **admin.E035**: The value of ``readonly_fields[n]`` is not a callable, an attribute of ``<ModelAdmin class>``, or an attribute of ``<model>``.
ModelAdmin
~~~~~~~~~~
The following checks are performed on any
:class:`~django.contrib.admin.ModelAdmin` that is registered
with the admin site:
* **admin.E101**: The value of ``save_as`` must be a boolean.
* **admin.E102**: The value of ``save_on_top`` must be a boolean.
* **admin.E103**: The value of ``inlines`` must be a list or tuple.
* **admin.E104**: ``<InlineModelAdmin class>`` must inherit from ``BaseModelAdmin``.
* **admin.E105**: ``<InlineModelAdmin class>`` must have a ``model`` attribute.
* **admin.E106**: The value of ``<InlineModelAdmin class>.model`` must be a Model.
* **admin.E107**: The value of ``list_display`` must be a list or tuple.
* **admin.E108**: The value of ``list_display[n]`` refers to ``<label>``, 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 ManyToManyField.
* **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>``, which is not defined in ``list_display``.
* **admin.E112**: The value of ``list_filter`` must be a list or tuple.
* **admin.E113**: The value of ``list_filter[n]`` must inherit from ``ListFilter``.
* **admin.E114**: The value of ``list_filter[n]`` must not inherit from ``FieldListFilter``.
* **admin.E115**: The value of ``list_filter[n][1]`` must inherit from ``FieldListFilter``.
* **admin.E116**: The value of ``list_filter[n]`` refers to ``<label>``, which does not refer to a Field.
* **admin.E117**: The value of ``list_select_related`` must be a boolean, tuple or list.
* **admin.E118**: The value of ``list_per_page`` must be an integer.
* **admin.E119**: The value of ``list_max_show_all`` must be an integer.
* **admin.E120**: The value of ``list_editable`` must be a list or tuple.
* **admin.E121**: The value of ``list_editable[n]`` refers to ``<label>``, which is not an attribute of ``<model>``.
* **admin.E122**: The value of ``list_editable[n]`` refers to ``<label>``, which is not contained in ``list_display``.
* **admin.E123**: The value of ``list_editable[n]`` cannot be in both ``list_editable`` and ``list_display_links``.
* **admin.E124**: The value of ``list_editable[n]`` refers to the first field in ``list_display`` (``<label>``), which cannot be used unless ``list_display_links`` is set.
* **admin.E125**: The value of ``list_editable[n]`` refers to ``<field name>``, which is not editable through the admin.
* **admin.E126**: The value of ``search_fields`` must be a list or tuple.
* **admin.E127**: The value of ``date_hierarchy`` refers to ``<field name>``, which is not an attribute of ``<model>``.
* **admin.E128**: The value of ``date_hierarchy`` must be a DateField or DateTimeField.
InlineModelAdmin
~~~~~~~~~~~~~~~~
The following checks are performed on any
:class:`~django.contrib.admin.InlineModelAdmin` that is registered as an
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``.