#23959 closed Bug (fixed)
Systems checks run when DEBUG is False
Reported by: | Ian Lewis | Owned by: | nobody |
---|---|---|---|
Component: | Core (System checks) | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Russell Keith-Magee | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The System check framework documentation (https://docs.djangoproject.com/en/1.7/topics/checks/) states the following:
"For performance reasons, the checks are not performed if DEBUG is set to False."
However, checks seem to be run anyway and I get warning messages even when DEBUG is False. I also could not find any code in Django 1.7.2 that checks the DEBUG flag.
Is this intended behavior? If so then the documentation is incorrect. If not, then the system check framework needs to be modified to check the DEBUG flag.
Attachments (1)
Change History (6)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
I think this is a hangover of some design decisions that were preserved in spirit, but not in reality. Essentially, we wanted to make sure checks wouldn't be run as part of the production stack; roughly speaking, that means "DEBUG=False", but in practice, it really means that the checks aren't run as part of the WSGI stack that is used to deploy the site.
The checks will still run in production as part of syncdb etc, but those aren't performance critical operations, so the overhead (such as it is) doesn't matter.
So - it isn't really "won't run if DEBUG is False", it's "won't run as part of your production deployment stack".
by , 10 years ago
Attachment: | ticket_23959.diff added |
---|
comment:3 by , 10 years ago
Has patch: | set |
---|
Just run into this issue, and have added a warning to the documentation while removing the "won't run if DEBUG is False" part. While a warning might be too rough, it is currently the only warning at the page, and therefore worth to direct the attention to this issue.
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Russ, do you know if this was an intentional omission?