Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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


The System check framework documentation ( 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)

ticket_23959.diff (1.2 KB) - added by Alexander Schulze 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by Tim Graham

Cc: Russell Keith-Magee added

Russ, do you know if this was an intentional omission?

comment:2 Changed 9 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

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".

Changed 9 years ago by Alexander Schulze

Attachment: ticket_23959.diff added

comment:3 Changed 9 years ago by Alexander Schulze

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 Changed 9 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In cf2390be164bcb3c5670f73b0a7062d6141f8664:

Fixed #23959 -- Clarified when checks automatically run.

comment:5 Changed 9 years ago by Tim Graham <timograham@…>

In 4c92ecd70592a7f64d8890ce2b0d67017512636a:

[1.7.x] Fixed #23959 -- Clarified when checks automatically run.

Backport of cf2390be164bcb3c5670f73b0a7062d6141f8664 from master

Note: See TracTickets for help on using tickets.
Back to Top