From a5c77417a651c93036cf963e6da518653115be7e Mon Sep 17 00:00:00 2001 From: Rigel Di Scala Date: Tue, 14 Oct 2014 14:10:27 +0100 Subject: 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". --- docs/ref/checks.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/ref') diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index 841c8f4c48..fde5dfa210 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -64,6 +64,7 @@ Models * **models.E019**: Autogenerated column name too long for M2M field ````. Maximum length is ```` for database ````. +* **models.E020**: The ``.check()`` class method is currently overridden. Fields ~~~~~~ @@ -94,7 +95,6 @@ Fields are mutually exclusive. Only one of these options may be present. * **fields.W161**: Fixed default value provided. - File Fields ~~~~~~~~~~~ -- cgit v1.3