Added error handling views and templates, added setting to log request errors to a file.

This commit is contained in:
Chris Church
2013-05-28 14:11:19 -04:00
parent e61a966464
commit 40dd9b08be
12 changed files with 117 additions and 12 deletions

View File

@@ -0,0 +1,20 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "Forbidden" %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> &rsaquo;
{% trans "Forbidden" %}
</div>
{% endblock %}
{% block content %}
<h1 style="margin-bottom: 0.7em;">{% trans 'Forbidden' %}</h1>
<p>{% trans "You don't have permission to access the requested page." %}</p>
{% endblock %}

View File

@@ -0,0 +1,18 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "Not Found" %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> &rsaquo;
{% trans "Not Found" %}
</div>
{% endblock %}
{% block content %}
<h1 style="margin-bottom: 0.7em;">{% trans 'Not Found' %}</h1>
<p>{% trans "We're sorry, but the requested page could not be found." %}</p>
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "Server Error" %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> &rsaquo;
{% trans "Server Error" %}
</div>
{% endblock %}
{% block content %}
<h1 style="margin-bottom: 0.7em;">{% trans 'Server Error' %}</h1>
<p>{% trans "A server error has occurred." %}</p>
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Ansible Commander Admin' %}{% endblock %}
{% block title %}{{ title }} | {% trans 'AnsibleWorks Admin' %}{% endblock %}
{% block extrastyle %}
{{ block.super }}
@@ -172,7 +172,7 @@ if (django.jQuery) {
{% endblock %}
{% block branding %}
<h1 id="site-name">{% trans 'Ansible Commander Admin' %}</h1>
<h1 id="site-name">{% trans 'AnsibleWorks Admin' %}</h1>
{% endblock %}
{% block userlinks %}