#26961: Run admin checks if DEBUG is False
--------------------------------------+------------------------------------
     Reporter:  adamchainz            |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.admin         |                  Version:  1.9
     Severity:  Normal                |               Resolution:
     Keywords:  checks                |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by adamchainz):

 One of the failures is interesting:

 {{{
   File "/home/jenkins/workspace/pull-requests-trusty/database/mysql/label
 /trusty-pr/python/python2.7/tests/model_validation/tests.py", line 23, in
 test_models_validate
     management.call_command("check", stdout=six.StringIO())
 }}}

 It looks like this test calls `check` which runs against everything in
 memory. Needs refactoring?

 Also this is partly caused by the way the admin checks run - they get
 executed during `site.register` and append all the errors to a global list
 of failures. This backfires in the wake of multiple `AdminSite`s which get
 created during the tests, with `ModelAdmin` classes registered and
 deregistered, leaving the errors they created at each `register` in the
 list. Any idea why the list isn't just calculated dynamically when `check`
 is called?

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

Reply via email to