diff --git a/app/vapemap/conf/production.py b/app/vapemap/conf/production.py index cf46b59..4ad691b 100644 --- a/app/vapemap/conf/production.py +++ b/app/vapemap/conf/production.py @@ -2,6 +2,10 @@ from .base import * DEBUG = False +MIDDLEWARE_CLASSES += [ + 'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware', +] + AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME', 'vapemap-static') diff --git a/app/vapemap/templates/500.html b/app/vapemap/templates/500.html new file mode 100644 index 0000000..f37fa07 --- /dev/null +++ b/app/vapemap/templates/500.html @@ -0,0 +1,26 @@ +{% extends "base.html" %} + +{% block style %} + +{% endblock %} + +{% block content %} +
+
+

Oops

+

It seems we hit a error serving your request. This may be a temporary error, so please try again in a minute or so.

+ {% if request.sentry %} +

If you've hit the same issue more than once, please consider using the Feedback tab and informing us what steps you took to produce this error, citing {{ request.sentry.id }} as the Error ID code.

+ {% endif %} +
+
+ +{% endblock %} \ No newline at end of file diff --git a/app/vapemap/urls.py b/app/vapemap/urls.py index 50e0564..b01cf94 100644 --- a/app/vapemap/urls.py +++ b/app/vapemap/urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin @@ -12,3 +13,8 @@ urlpatterns = patterns('', ) urlpatterns += staticfiles_urlpatterns() + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^500/$', 'django.views.defaults.server_error'), + )