Add custom error pages

This commit is contained in:
2020-06-12 22:50:08 +02:00
parent bec6b19d1c
commit 4f5013460f
4 changed files with 35 additions and 0 deletions

6
app/templates/404.html Normal file
View File

@@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block app_content %}
<h1>Sorry, we couldn't find that</h1>
<p><a href="{{ url_for('index') }}">Back</a></p>
{% endblock %}

8
app/templates/500.html Normal file
View File

@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block app_content %}
<h1>An unexpected error has occurred</h1>
<p>The administrator has been notified!</p>
<p>If he gets too many notifications, we might replace him with an AI</p>
<p><a href="{{ url_for('index') }}">Back</a></p>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
<h1>Dataset visualization</h1>
<img src="data:image/png;base64,{{ plot }}" alt="Image Placeholder">
<img src="data:image/png;base64,{{ map }}" alt="Image Placeholder">
<p><a href="{{ url_for('data') }}">Back</a></p>
{% endblock %}