Opened 17 years ago
Closed 16 years ago
#6172 closed (fixed)
Disabling Django Exception System
Reported by: | Armin Ronacher | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm getting mails and comments on my blog if there are ways to get the werkzeug debugger running in django. In theory that should be easy because django supports WSGI, however there is currently no way to hook in WSGI middlewares, and even more important: disable the django error reporting system.
Hooking in custom WSGI middlewares is pretty simple for the dev server or a non mod_python environment, however there is currently no sane way to disable the default debugger (beside monkey patching).
My proposal: add a config value DISABLE_EXCEPTION_PROCESSING that disables the debug view and exception mailing system completely.
Change History (4)
comment:1 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
That does not invalidate the exception handler...
comment:3 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
So you want Django to just re-raise exceptions instead of handling them? That seems dangerous -- it could result in the web server exiting (depending on your setup) and such. I'm a bit hesitant to add a setting so dangerous; can't you just write a custom exception middleware?
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This has been resolved in [7537].
Having just used some time to create a patch for this, I later discovered that the docs explains, that one can (ofcourse) just not add any
ADMINS
. I hope it's okay that I've invalidated this ticket on the grounds that the behavior is already explained in the documentation, if not, I'm sorry.