diff options
| author | Rigel Di Scala <rigel.discala@propylon.com> | 2014-10-14 14:10:27 +0100 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@gmail.com> | 2014-10-17 00:36:43 +0700 |
| commit | e8262b59418d68d55a97a25567e4bc4f078ed3cb (patch) | |
| tree | 832d3d71c88c2e74faf2d0c252a79f5f7aa1e393 /docs/ref | |
| parent | b729ef0bda5009389da7e3a5498dc1f6233761d6 (diff) | |
[1.7.x] Fixed #23615 -- Validate that a Model instance's "check" attribute is a method.
The "check" name is a reserved word used by Django's check framework,
and cannot be redefined as something else other than a method, or the check
framework will raise an error.
This change amends the django.core.checks.model_check.check_all_models()
function, so that it verifies that a model instance's attribute "check"
is actually a method. This new check is assigned the id "models.E020".
Conflicts:
docs/ref/checks.txt
Backport of a5c77417a6 from master
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/checks.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index ca37de4385..0a2f3a7557 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -56,6 +56,7 @@ Models * **models.E015**: ``ordering`` refers to the non-existent field ``<field name>``. * **models.E017**: Proxy model ``<model>`` contains model fields. +* **models.E020**: The ``<model>.check()`` class method is currently overridden. Fields ~~~~~~ |
