mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Add title as context and remove wrong title from templates
This commit is contained in:
parent
d7de198302
commit
eef9ec9b37
@ -9,7 +9,7 @@ def forbidden(e):
|
||||
response = jsonify({'error': 'forbidden'})
|
||||
response.status_code = 403
|
||||
return response
|
||||
return render_template('403.html.j2'), 403
|
||||
return render_template('403.html.j2', title='Forbidden'), 403
|
||||
|
||||
|
||||
@main.app_errorhandler(404)
|
||||
@ -19,7 +19,7 @@ def page_not_found(e):
|
||||
response = jsonify({'error': 'not found'})
|
||||
response.status_code = 404
|
||||
return response
|
||||
return render_template('404.html.j2'), 404
|
||||
return render_template('404.html.j2', title='Not Found'), 404
|
||||
|
||||
|
||||
@main.app_errorhandler(500)
|
||||
@ -29,4 +29,4 @@ def internal_server_error(e):
|
||||
response = jsonify({'error': 'internal server error'})
|
||||
response.status_code = 500
|
||||
return response
|
||||
return render_template('500.html.j2'), 500
|
||||
return render_template('500.html.j2', title='Internal Server Error'), 500
|
||||
|
@ -1,9 +1,7 @@
|
||||
{% extends "base.html.j2" %}
|
||||
|
||||
{% block title %}Opaque - Forbidden{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="page-header">
|
||||
<h1>Forbidden</h1>
|
||||
<p>This site is forbidden for you.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,7 @@
|
||||
{% extends "base.html.j2" %}
|
||||
|
||||
{% block title %}Opaque - Page Not Found{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="page-header">
|
||||
<h1>Not Found</h1>
|
||||
<p>Site has not been found.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,7 @@
|
||||
{% extends "base.html.j2" %}
|
||||
|
||||
{% block title %}Opaque - Internal Server Error{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="page-header">
|
||||
<h1>Internal Server Error</h1>
|
||||
<p>Internal Server Error. We are Sorry!</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user