#23615: Naming a model Check causes Django's check framework to fail with an
exception
--------------------------------------+------------------------------------
Reporter: bramd | Owner: zedr
Type: Bug | Status: closed
Component: Core (System checks) | Version: 1.7
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Loic Bistuer <loic.bistuer@…>):
In [changeset:"e8262b59418d68d55a97a25567e4bc4f078ed3cb"]:
{{{
#!CommitTicketReference repository=""
revision="e8262b59418d68d55a97a25567e4bc4f078ed3cb"
[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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23615#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.cf928b010f124ace59444f2abde48525%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.