mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-11 04:07:48 +03:00
Merge pull request #332 from yunti/missing-raven-local
Fix for wsgi.py for Raven in dev
This commit is contained in:
commit
f296f96a96
|
@ -20,7 +20,10 @@ from django.core.wsgi import get_wsgi_application
|
|||
from whitenoise.django import DjangoWhiteNoise
|
||||
{%- endif %}
|
||||
{% if cookiecutter.use_sentry == "y" -%}
|
||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||
if os.environ.get("DJANGO_SETTINGS_MODULE") == "config.settings.production":
|
||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||
else:
|
||||
pass
|
||||
{%- endif %}
|
||||
|
||||
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
|
||||
|
@ -40,7 +43,10 @@ application = get_wsgi_application()
|
|||
application = DjangoWhiteNoise(application)
|
||||
{%- endif %}
|
||||
{% if cookiecutter.use_sentry == "y" -%}
|
||||
application = Sentry(application)
|
||||
if os.environ.get("DJANGO_SETTINGS_MODULE") == "config.settings.production":
|
||||
application = Sentry(application)
|
||||
else:
|
||||
pass
|
||||
{%- endif %}
|
||||
|
||||
# Apply WSGI middleware here.
|
||||
|
|
Loading…
Reference in New Issue
Block a user