2

For some https testing I needed to install Werkzeug. When accessing my site via https, Werkzeug decides that it must catch all exceptions, and takes over the role of the django-debug-toolbar and built-in django exception handling, by default, without even a configuration parameter:

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

Well, I am panicking right now. I want my django-debug-toolbar back, specially when doing https, since what Werkzeug shows me is by comparison not enough.

How can I tell Werkzeug to stop being intrusive, and let exceptions reach django?

blueFast
  • 41,341
  • 63
  • 198
  • 344

1 Answers1

0

I'm guessing that you're using django-extensions's RunServerPlus (manage.py runserver_plus) to test HTTPS. RunServerPlus enables the Werkzeug debugger by default and looking at the source, there's no way to disable it. The same applies to django-werkzeug-debugger-runserver.

I'd recommend opening an issue with the django-extensions project and/or trying django-sslserver as an alternative.


In case I guessed incorrectly: If you're directly using Werkzeug's run_simple, call it with use_debugger=False. If you're directly using Werkzeug's DebuggedApplication middleware, well, stop using it - it's the source of your problems.

Miikka
  • 4,573
  • 34
  • 47