mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-14 06:42:17 +00:00
Add Error 500 template and a small testing view for Debug.
This commit is contained in:
@@ -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')
|
||||
|
||||
26
app/vapemap/templates/500.html
Normal file
26
app/vapemap/templates/500.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block style %}
|
||||
<style type="text/css">
|
||||
#site-error {
|
||||
text-align: center;
|
||||
}
|
||||
#site-error h1 {
|
||||
font-size: 70px;
|
||||
line-height: 70px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row-fluid">
|
||||
<div id="site-error" class="span12">
|
||||
<h1>Oops</h1>
|
||||
<p>It seems we hit a error serving your request. This may be a temporary error, so please try again in a minute or so.</p>
|
||||
{% if request.sentry %}
|
||||
<p>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.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -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'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user