Browse files

Only use Sentry if not DEBUG.

  • Loading branch information...
1 parent 7ab5f9f commit 6251f2a5136f157c18faed34d417ab6d9262ff17 @jacobian jacobian committed Apr 1, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 django_docs/settings.py
  2. +1 −1 django_www/settings.py
View
2 django_docs/settings.py
@@ -85,7 +85,7 @@
'debug_toolbar.middleware.DebugToolbarMiddleware')
# Log errors to Sentry instead of email, if available.
-if 'sentry_dsn' in SECRETS:
+if 'sentry_dsn' in SECRETS and not DEBUG:
INSTALLED_APPS.append('raven.contrib.django')
SENTRY_DSN = SECRETS['sentry_dsn']
LOGGING["loggers"]["django.request"]["handlers"].remove("mail_admins")
View
2 django_www/settings.py
@@ -119,7 +119,7 @@
'debug_toolbar.middleware.DebugToolbarMiddleware')
# Log errors to Sentry instead of email, if available.
-if 'sentry_dsn' in SECRETS:
+if 'sentry_dsn' in SECRETS and not DEBUG:
INSTALLED_APPS.append('raven.contrib.django')
SENTRY_DSN = SECRETS['sentry_dsn']
LOGGING["loggers"]["django.request"]["handlers"].remove("mail_admins")

0 comments on commit 6251f2a

Please sign in to comment.