#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
--------------------------------------+------------------------------------
Changes (by Loic Bistuer <loic.bistuer@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"a5c77417a651c93036cf963e6da518653115be7e"]:
 {{{
 #!CommitTicketReference repository=""
 revision="a5c77417a651c93036cf963e6da518653115be7e"
 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".
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23615#comment:10>
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.5c1a61165ac4cd2144354353eb904c0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to