Skip to content

Commit

Permalink
Avoid wsgi load error when sentry is enabled
Browse files Browse the repository at this point in the history
This change was made necessary with changes in django 1.8
  • Loading branch information
nemesifier committed Sep 11, 2015
1 parent d36e853 commit 6373e23
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions nodeshot/conf/wsgi.py
Expand Up @@ -3,15 +3,12 @@
# setting points here.

from django.conf import settings
from django.core.wsgi import get_wsgi_application

application = get_wsgi_application()

# sentry WSGI handler if configured
# more info here: http://raven.readthedocs.org/en/latest/config/django.html#wsgi-middleware
if settings.SENTRY_ENABLED:
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
from django.core.handlers.wsgi import WSGIHandler
application = Sentry(WSGIHandler())
# django default wsgi
else:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
application = Sentry(application)

0 comments on commit 6373e23

Please sign in to comment.