diff options
-rw-r--r-- | django_skaschool/settings_production.py | 12 | ||||
-rw-r--r-- | templates/400.html | 20 | ||||
-rw-r--r-- | templates/403.html | 20 | ||||
-rw-r--r-- | templates/404.html | 20 | ||||
-rw-r--r-- | templates/500.html | 19 |
5 files changed, 91 insertions, 0 deletions
diff --git a/django_skaschool/settings_production.py b/django_skaschool/settings_production.py index aa26ac3..80eaedf 100644 --- a/django_skaschool/settings_production.py +++ b/django_skaschool/settings_production.py @@ -150,6 +150,18 @@ MEDIA_URL = '/media/' ## email settings from settings_email import * +## ADMINS: notified 500 error by emails +# When DEBUG=False and a view raises an exception, django will +# email these people with full exception information. +ADMINS = ( + ('admin', 'skaschool2014@163.com'), +) + +## MANAGERS: notified of 404 errors +# Specifies who should get broken link notifications when +# 'BrokenLinkEmailsMiddleware' is enabled. +MANAGERS = ADMINS + ################################################# ## bootstrap3 diff --git a/templates/400.html b/templates/400.html new file mode 100644 index 0000000..89ce313 --- /dev/null +++ b/templates/400.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} + +{# 400 bad request template #} + +{% block title %} +400无效的请求 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>404 Bad Request</h2> + <p class="lead">Oops, 无效的请求……</p> + <br> + <p>如有问题,请与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/403.html b/templates/403.html new file mode 100644 index 0000000..2e7259e --- /dev/null +++ b/templates/403.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} + +{# 403 HTTP Forbidden template #} + +{% block title %} +403禁止访问 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>403 HTTP Forbidden</h2> + <p class="lead">Oops, 您没有足够的权限访问该页面……</p> + <br> + <p>如有问题,请与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..1a75d8c --- /dev/null +++ b/templates/404.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} + +{# 404 page not found template #} + +{% block title %} +404页面未找到 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>404 Page not Found</h2> + <p class="lead">Oops, 您想要的页面未找到……</p> + <br> + <p>如有问题,请与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/500.html b/templates/500.html new file mode 100644 index 0000000..23b695e --- /dev/null +++ b/templates/500.html @@ -0,0 +1,19 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html lang="en"> +<head> +<title>500 Server Error </title> +</head> +<body> + <h2>500 Server Error</h2> + + <p>Sorry, but the requested page is unavailable due to a + server hiccup.</p> + + <p>Our engineers have been notified, so check back later.</p> + + <p>If needed please contact us: <a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> +</body> +</html> + +<!-- vim: set ts=8 sw=2 tw=0 fenc= ft=html: --> |