diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-29 08:57:12 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-29 09:01:08 +0100 |
commit | 6b5f1ca79b42b977ea5f436ac7ab329fd2da1b6b (patch) | |
tree | a687adb129f8e45dcf5ec66463532a9ceb753ac9 /mediagoblin/templates | |
parent | efb70b529f3c04054e4453144155b18a8400281b (diff) | |
download | mediagoblin-6b5f1ca79b42b977ea5f436ac7ab329fd2da1b6b.tar.lz mediagoblin-6b5f1ca79b42b977ea5f436ac7ab329fd2da1b6b.tar.xz mediagoblin-6b5f1ca79b42b977ea5f436ac7ab329fd2da1b6b.zip |
Implement generic error pages
Rather than having a 404.html, a 403.html, a 500.html,...
we have a generic error.html template that we pass in an
error code, a title and a (html'ish) error message.
Implement the common render_404 and render_403 shortcuts. More exotic
cases can be achieved by the generic render_error function.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/error.html (renamed from mediagoblin/templates/mediagoblin/404.html) | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mediagoblin/templates/mediagoblin/404.html b/mediagoblin/templates/mediagoblin/error.html index c0fe8b62..c16b650f 100644 --- a/mediagoblin/templates/mediagoblin/404.html +++ b/mediagoblin/templates/mediagoblin/error.html @@ -17,15 +17,12 @@ #} {% extends "mediagoblin/base.html" %} -{% block title %}404 — {{ super() }}{% endblock %} +{% block title %}{{err_code}} — {{ super() }}{% endblock %} {% block mediagoblin_content %} <img class="right_align" src="{{ request.staticdirect('/images/404.png') }}" - alt="{% trans %}Image of 404 goblin stressing out{% endtrans %}" /> - <h1>{% trans %}Oops!{% endtrans %}</h1> - <p>{% trans %}There doesn't seem to be a page at this address. Sorry!{% endtrans %}</p> - <p> - {%- trans %}If you're sure the address is correct, maybe the page you're looking for has been moved or deleted.{% endtrans -%} - </p> + alt="{% trans %}Image of goblin stressing out{% endtrans %}" /> + <h1>{{ title }}</h1> + <p>{{ err_msg|safe }}</p> <div class="clear"></div> {% endblock %} |