summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-28 10:57:16 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-28 10:58:18 +0200
commit031ffc5c849942f42c7ab12facef27483316dac1 (patch)
tree576b7bad22d192813008e64a0336ae79dbf41bca
parent7607fe922fd397f9dac58d6bc4c8bef583b947a6 (diff)
[3.2.x] Corrected field and model check messages in docs.
Follow up to 72d04e03855536cf36090aedbb7aa8f1c4c8b443. Backport of 93f3b7a0ba2969109940775a18515728603afac6 from main
-rw-r--r--docs/ref/checks.txt33
1 files changed, 16 insertions, 17 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 2ad7defdfb..9158d4a1bf 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -169,7 +169,7 @@ Model fields
* **fields.E003**: ``pk`` is a reserved word that cannot be used as a field
name.
* **fields.E004**: ``choices`` must be an iterable (e.g., a list or tuple).
-* **fields.E005**: ``choices`` must be an iterable returning ``(actual value,
+* **fields.E005**: ``choices`` must be an iterable containing ``(actual value,
human readable name)`` tuples.
* **fields.E006**: ``db_index`` must be ``None``, ``True`` or ``False``.
* **fields.E007**: Primary keys must not have ``null=True``.
@@ -188,12 +188,12 @@ Model fields
* **fields.E130**: ``DecimalField``\s must define a ``decimal_places`` attribute.
* **fields.E131**: ``decimal_places`` must be a non-negative integer.
* **fields.E132**: ``DecimalField``\s must define a ``max_digits`` attribute.
-* **fields.E133**: ``max_digits`` must be a non-negative integer.
+* **fields.E133**: ``max_digits`` must be a positive integer.
* **fields.E134**: ``max_digits`` must be greater or equal to ``decimal_places``.
* **fields.E140**: ``FilePathField``\s must have either ``allow_files`` or
``allow_folders`` set to True.
-* **fields.E150**: ``GenericIPAddressField``\s cannot accept blank values if
- null values are not allowed, as blank values are stored as nulls.
+* **fields.E150**: ``GenericIPAddressField``\s cannot have ``blank=True`` if
+ ``null=False``, as blank values are stored as nulls.
* **fields.E160**: The options ``auto_now``, ``auto_now_add``, and ``default``
are mutually exclusive. Only one of these options may be present.
* **fields.W161**: Fixed default value provided.
@@ -239,17 +239,16 @@ Related fields
either not installed, or is abstract.
* **fields.E301**: Field defines a relation with the model
``<app_label>.<model>`` which has been swapped out.
-* **fields.E302**: Accessor for field ``<app_label>.<model>.<field name>``
- clashes with field ``<app_label>.<model>.<field name>``.
-* **fields.E303**: Reverse query name for field
- ``<app_label>.<model>.<field name>`` clashes with field
- ``<app_label>.<model>.<field name>``.
-* **fields.E304**: Field name ``<app_label>.<model>.<field name>`` clashes with
- accessor for ``<app_label>.<model>.<field name>``.
-* **fields.E305**: Field name ``<app_label>.<model>.<field name>`` clashes with
- reverse query name for ``<app_label>.<model>.<field name>``.
-* **fields.E306**: Related name must be a valid Python identifier or end with
- a ``'+'``.
+* **fields.E302**: Reverse accessor for ``<app_label>.<model>.<field name>``
+ clashes with field name ``<app_label>.<model>.<field name>``.
+* **fields.E303**: Reverse query name for ``<app_label>.<model>.<field name>``
+ clashes with field name ``<app_label>.<model>.<field name>``.
+* **fields.E304**: Reverse accessor for ``<app_label>.<model>.<field name>``
+ clashes with reverse accessor for ``<app_label>.<model>.<field name>``.
+* **fields.E305**: Reverse query name for ``<app_label>.<model>.<field name>``
+ clashes with reverse query name for ``<app_label>.<model>.<field name>``.
+* **fields.E306**: The name ``<name>`` is invalid ``related_name`` for field
+ ``<model>.<field name>``.
* **fields.E307**: The field ``<app label>.<model>.<field name>`` was declared
with a lazy reference to ``<app label>.<model>``, but app ``<app label>``
isn't installed or doesn't provide model ``<model>``.
@@ -314,8 +313,8 @@ Models
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.E006**: The field ``<field name>`` 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.