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-16 23:49:21 +0700 |
| commit | a5c77417a651c93036cf963e6da518653115be7e (patch) | |
| tree | bffcc1d05dae9573b5de308bab0335b733ce1110 /docs | |
| parent | 157f9cf240427bd52aa09a895ac4456da167f876 (diff) | |
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".
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/checks.txt | 2 | ||||
| -rw-r--r-- | docs/releases/1.7.1.txt | 3 |
2 files changed, 4 insertions, 1 deletions
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 ``<M2M field>``. Maximum length is ``<maximum length>`` for database ``<alias>``. +* **models.E020**: The ``<model>.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 ~~~~~~~~~~~ diff --git a/docs/releases/1.7.1.txt b/docs/releases/1.7.1.txt index 6c06857396..435c496230 100644 --- a/docs/releases/1.7.1.txt +++ b/docs/releases/1.7.1.txt @@ -120,3 +120,6 @@ Bugfixes * Fixed a crash while parsing cookies containing invalid content (:ticket:`23638`). + +* The system check framework now raises error **models.E020** when the + class method ``Model.check()`` is unreachable (:ticket:`23615`). |
