Skip to content
Snippets Groups Projects
Commit 3853c6f4 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Make sure the sentry dsn isnt run on tests and update to avoid bug on live

parent 7a5bce60
No related branches found
No related tags found
No related merge requests found
...@@ -11,12 +11,6 @@ from .base import * # noqa ...@@ -11,12 +11,6 @@ from .base import * # noqa
# Disable debug mode # Disable debug mode
DEBUG = False DEBUG = False
# Raven (sentry) configuration. See local settings for DSN
INSTALLED_APPS += (
'raven.contrib.django.raven_compat',
)
# Cache everything for 10 minutes # Cache everything for 10 minutes
# This only applies to pages that do not have a more specific cache-control # This only applies to pages that do not have a more specific cache-control
...@@ -29,6 +23,16 @@ CACHE_CONTROL_MAX_AGE = 600 ...@@ -29,6 +23,16 @@ CACHE_CONTROL_MAX_AGE = 600
env = os.environ.copy() env = os.environ.copy()
# Raven (sentry) configuration. See local settings for DSN
if 'SENTRY_DSN' in env:
INSTALLED_APPS += (
'raven.contrib.django.raven_compat',
)
SENTRY_DSN = env['SENTRY_DSN']
# On Torchbox servers, many environment variables are prefixed with "CFG_" # On Torchbox servers, many environment variables are prefixed with "CFG_"
for key, value in os.environ.items(): for key, value in os.environ.items():
if key.startswith('CFG_'): if key.startswith('CFG_'):
......
...@@ -29,4 +29,4 @@ dj-database-url==0.4.1 ...@@ -29,4 +29,4 @@ dj-database-url==0.4.1
whitenoise==2.0.4 whitenoise==2.0.4
uwsgi==2.0.15 uwsgi==2.0.15
ConcurrentLogHandler==0.9.1 ConcurrentLogHandler==0.9.1
raven==6.1.0 raven==6.9.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment