Skip to content

Commit

Permalink
render error pages using base template
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Feb 8, 2015
1 parent dd11a45 commit 19f0d76
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
7 changes: 5 additions & 2 deletions nsupdate/templates/400.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<h1>400 Bad Request</h1>
{% extends "errorpage.html" %}

This kind of request is not allowed.
{% block error %}
<h1>400 Bad Request</h1>

This kind of request is not allowed here.
{% endblock %}
6 changes: 5 additions & 1 deletion nsupdate/templates/403.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "errorpage.html" %}

{% block error %}
<h1>403 Forbidden</h1>

Sorry, this is not allowed (for you).

If you did not login yet, try logging in.
If you did not log in yet, try logging in.
{% endblock %}
5 changes: 4 additions & 1 deletion nsupdate/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{% extends "errorpage.html" %}

{% block error %}
<h1>404 Not found</h1>

Nothing to see here.

{% endblock %}
6 changes: 5 additions & 1 deletion nsupdate/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{% extends "errorpage.html" %}

{% block error %}
<h1>500 Internal Server Error</h1>

Sorry :( we screwed up.
Sorry, we screwed up. Try again later. :(
{% endblock %}
10 changes: 10 additions & 0 deletions nsupdate/templates/errorpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% load i18n %}{% load bootstrap %}

{% block content %}
<div class="row">
{% block error %}
{% endblock %}
</div>
{% endblock %}

0 comments on commit 19f0d76

Please sign in to comment.