From e8262b59418d68d55a97a25567e4bc4f078ed3cb Mon Sep 17 00:00:00 2001 From: Rigel Di Scala Date: Tue, 14 Oct 2014 14:10:27 +0100 Subject: [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 --- docs/ref/checks.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/ref') 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 ````. * **models.E017**: Proxy model ```` contains model fields. +* **models.E020**: The ``.check()`` class method is currently overridden. Fields ~~~~~~ -- cgit v1.3