Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Django with Werkzeug under WSGI/Passenger - problems

I'm trying to use the werkzeug debugger, but despite installing it as recommended, I just get the normal django error page.

from my passenger_wsgi.py:

import django.core.handlers.wsgi
from werkzeug.debug import DebuggedApplication

application = django.core.handlers.wsgi.WSGIHandler()
application = DebuggedApplication(application, evalex=True)

I'm largely constrained to running my django app (even in development) through passenger, not manage.py.

Is there any way I can get the werkzeug debugger to work under these conditions? Could I, for instance prevent Django from intercepting the errors itself?

like image 448
Marcin Avatar asked Dec 27 '22 16:12

Marcin


1 Answers

You can disable Django exception handling with DEBUG_PROPAGATE_EXCEPTIONS setting. Then Werkzeug will be able to handle it.

like image 64
Ilia Novoselov Avatar answered Dec 31 '22 13:12

Ilia Novoselov