Django

Code

Ticket #6172 (closed: fixed)

Opened 1 year ago

Last modified 6 months ago

Disabling Django Exception System

Reported by: mitsuhiko Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

01/04/08 11:29:12 changed by anonymous

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to invalid.
  • needs_tests changed.
  • needs_docs changed.

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.

01/04/08 11:30:52 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

That does not invalidate the exception handler...

03/11/08 15:30:03 changed by jacob

  • 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?

05/22/08 05:55:12 changed by Simon

  • status changed from reopened to closed.
  • resolution set to fixed.

This has been resolved in [7537].


Add/Change #6172 (Disabling Django Exception System)




Change Properties
Action