mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 18:34:18 +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 = jsonify({'error': 'forbidden'})
|
||||||
response.status_code = 403
|
response.status_code = 403
|
||||||
return response
|
return response
|
||||||
return render_template('403.html.j2'), 403
|
return render_template('403.html.j2', title='Forbidden'), 403
|
||||||
|
|
||||||
|
|
||||||
@main.app_errorhandler(404)
|
@main.app_errorhandler(404)
|
||||||
@ -19,7 +19,7 @@ def page_not_found(e):
|
|||||||
response = jsonify({'error': 'not found'})
|
response = jsonify({'error': 'not found'})
|
||||||
response.status_code = 404
|
response.status_code = 404
|
||||||
return response
|
return response
|
||||||
return render_template('404.html.j2'), 404
|
return render_template('404.html.j2', title='Not Found'), 404
|
||||||
|
|
||||||
|
|
||||||
@main.app_errorhandler(500)
|
@main.app_errorhandler(500)
|
||||||
@ -29,4 +29,4 @@ def internal_server_error(e):
|
|||||||
response = jsonify({'error': 'internal server error'})
|
response = jsonify({'error': 'internal server error'})
|
||||||
response.status_code = 500
|
response.status_code = 500
|
||||||
return response
|
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" %}
|
{% extends "base.html.j2" %}
|
||||||
|
|
||||||
{% block title %}Opaque - Forbidden{% endblock %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Forbidden</h1>
|
<p>This site is forbidden for you.</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{% extends "base.html.j2" %}
|
{% extends "base.html.j2" %}
|
||||||
|
|
||||||
{% block title %}Opaque - Page Not Found{% endblock %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Not Found</h1>
|
<p>Site has not been found.</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{% extends "base.html.j2" %}
|
{% extends "base.html.j2" %}
|
||||||
|
|
||||||
{% block title %}Opaque - Internal Server Error{% endblock %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Internal Server Error</h1>
|
<p>Internal Server Error. We are Sorry!</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user