Opened 16 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 anonymous, 16 years ago

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 by anonymous, 16 years ago

Resolution: invalid
Status: closedreopened

That does not invalidate the exception handler...

comment:3 by Jacob, 16 years ago

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 by Simon, 16 years ago

Resolution: fixed
Status: reopenedclosed

This has been resolved in [7537].

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