diff --git a/PyRIGS/settings.py b/PyRIGS/settings.py index e92b645b..4a6756fd 100644 --- a/PyRIGS/settings.py +++ b/PyRIGS/settings.py @@ -50,9 +50,11 @@ INSTALLED_APPS = ( 'reversion', 'captcha', 'widget_tweaks', + 'raven.contrib.django.raven_compat', ) MIDDLEWARE_CLASSES = ( + 'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware', 'reversion.middleware.RevisionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', @@ -129,6 +131,15 @@ LOGGING = { } } +import raven + +RAVEN_CONFIG = { + 'dsn': os.environ.get('RAVEN_DSN'), + # If you are using git, you can also automatically configure the + # release based on the git info. + 'release': raven.fetch_git_sha(os.path.dirname(os.path.dirname(__file__))), +} + # User system AUTH_USER_MODEL = 'RIGS.Profile' diff --git a/templates/500.html b/templates/500.html index c135cd4c..2fc2db83 100644 --- a/templates/500.html +++ b/templates/500.html @@ -6,5 +6,6 @@

500: Server error

+

If you need assistance, you may reference this error as {{ request.sentry.id }}.

{% endblock %} diff --git a/templates/base.html b/templates/base.html index dbf56576..eb889496 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,5 @@ {% load static from staticfiles %} +{% load raven %} @@ -21,6 +22,7 @@ {% endblock %} + {% block preload_js %} {% endblock %}