From ce26313905fa5d5c141cc7a871d37e1740765df1 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Thu, 24 Apr 2014 00:14:11 +0800 Subject: * added 'ADMINS' and 'MANAGERS' settings to settings_production.py * added templates 400, 404, 404 and 500 --- django_skaschool/settings_production.py | 12 ++++++++++++ templates/400.html | 20 ++++++++++++++++++++ templates/403.html | 20 ++++++++++++++++++++ templates/404.html | 20 ++++++++++++++++++++ templates/500.html | 19 +++++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 templates/400.html create mode 100644 templates/403.html create mode 100644 templates/404.html create mode 100644 templates/500.html 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 %} +
+

404 Bad Request

+

Oops, 无效的请求……

+
+

如有问题,请与我们联系:skaschool2014@163.com

+
+{% 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 %} +
+

403 HTTP Forbidden

+

Oops, 您没有足够的权限访问该页面……

+
+

如有问题,请与我们联系:skaschool2014@163.com

+
+{% 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 %} +
+

404 Page not Found

+

Oops, 您想要的页面未找到……

+
+

如有问题,请与我们联系:skaschool2014@163.com

+
+{% 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 @@ + + + +500 Server Error + + +

500 Server Error

+ +

Sorry, but the requested page is unavailable due to a + server hiccup.

+ +

Our engineers have been notified, so check back later.

+ +

If needed please contact us: skaschool2014@163.com

+ + + + -- cgit v1.2.2