I'm new to werkzeug. I've installed the following packages:
django_extensions
werkzeug
added the following to my Django settings file:
########## WERKZEUG/DJANGO EXTENSIONS
INSTALLED_APPS += (
'django_extensions',
'werkzeug',
)
MIDDLEWARE_CLASSES += (
'werkzeug.debug.DebuggedApplication',
)
########## END WERKZEUG/DJANGO EXTENSIONS
and created a dev_wsgi.py file that I call from my gunicorn driver script:
# basic wsgi.py
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my-site.settings.dev')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Werkzeug-specific
import django.views.debug
def null_technical_500_response(request, exc_type, exc_value, tb):
raise exc_type, exc_value, tb
django.views.debug.technical_500_response = null_technical_500_response
# apply Werkzeug WSGI middleware
from werkzeug.debug import DebuggedApplication
application = DebuggedApplication(application, evalex=True)
But now when I view a test URL, I get the following traceback:
File
"/python2-venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py",
line 187, in __call__
self.load_middleware()
File
"/python2-venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 49, in load_middleware
mw_instance = mw_class()
TypeError: __init__() takes at least 2 arguments (1 given)
Commenting out the Werkzeug-specific lines in dev_wsgi.py allows my test
page to display correctly. I'm using Werkzeug 0.9.4, django_extensions
1.3.3, django 1.6.4 and Python 2.7.6.
Thanks,
--Dan
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.