Opened 8 years ago

Closed 8 years ago

#6172 closed (fixed)

Disabling Django Exception System

Reported by: mitsuhiko 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 8 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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

  • Resolution invalid deleted
  • Status changed from closed to reopened

That does not invalidate the exception handler...

comment:3 Changed 8 years ago by jacob

  • Triage Stage changed from Unreviewed to 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 Changed 8 years ago by Simon

  • Resolution set to fixed
  • Status changed from reopened to closed

This has been resolved in [7537].

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