Created
July 30, 2011 08:46
-
-
Save klen/1115338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from django.core.handlers.wsgi import WSGIHandler | |
# Celery settings: | |
os.environ['CELERY_LOADER'] = 'django' | |
os.environ['DJANGO_SETTINGS_MODULE'] = os.environ.get('DJANGO_SETTINGS_MODULE', 'settings.dev') | |
application = WSGIHandler() | |
if ( 'dev' in os.environ['DJANGO_SETTINGS_MODULE'] or | |
'local' in os.environ['DJANGO_SETTINGS_MODULE'] ): | |
from werkzeug.debug import DebuggedApplication | |
from django.views import debug | |
def null_technical_500_response(request, exc_type, exc_value, tb): | |
raise exc_type, exc_value, tb | |
debug.technical_500_response = null_technical_500_response | |
application = DebuggedApplication(application, evalex=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment