Opened 10 years ago

Closed 10 years ago

#6172 closed (fixed)

Disabling Django Exception System

Reported by: Armin Ronacher Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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 Changed 10 years ago by anonymous

Resolution: invalid
Status: newclosed

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.

comment:2 Changed 10 years ago by anonymous

Resolution: invalid
Status: closedreopened

That does not invalidate the exception handler...

comment:3 Changed 10 years ago by Jacob

Triage Stage: UnreviewedDesign 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 Changed 10 years ago by Simon

Resolution: fixed
Status: reopenedclosed

This has been resolved in [7537].

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