Add ability for 404 page to show error description.
This commit is contained in:
parent
e3ae3a1ccb
commit
74452fe58f
|
@ -75,7 +75,7 @@ def history(name):
|
||||||
more = True
|
more = True
|
||||||
items.pop()
|
items.pop()
|
||||||
if page > 1 and not items:
|
if page > 1 and not items:
|
||||||
abort(404)
|
abort(404, 'Page is past end of history.')
|
||||||
for item in items:
|
for item in items:
|
||||||
item['gravatar'] = gravatar_url(item['author_email'])
|
item['gravatar'] = gravatar_url(item['author_email'])
|
||||||
return render_template('wiki/history.html', name=name, history=items,
|
return render_template('wiki/history.html', name=name, history=items,
|
||||||
|
|
|
@ -2,5 +2,8 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<h1>Page Not Found</h1>
|
<h1>Page Not Found</h1>
|
||||||
|
{% if error is defined %}
|
||||||
|
<h4>{{ error.description }}</h4>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue