diff --git a/app/errors.py b/app/errors.py new file mode 100644 index 0000000..b273a65 --- /dev/null +++ b/app/errors.py @@ -0,0 +1,12 @@ +from flask import render_template +from app import app + + +@app.errorhandler(404) +def not_found_error(error): + return render_template("404.html"), 404 + + +@app.errorhandler(500) +def internal_error(error): + return render_template("500.html"), 500 diff --git a/app/templates/404.html b/app/templates/404.html new file mode 100644 index 0000000..0bac211 --- /dev/null +++ b/app/templates/404.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block app_content %} +

Sorry, we couldn't find that

+

Back

+{% endblock %} diff --git a/app/templates/500.html b/app/templates/500.html new file mode 100644 index 0000000..984d38c --- /dev/null +++ b/app/templates/500.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block app_content %} +

An unexpected error has occurred

+

The administrator has been notified!

+

If he gets too many notifications, we might replace him with an AI

+

Back

+{% endblock %} diff --git a/app/templates/visualization.html b/app/templates/visualization.html new file mode 100644 index 0000000..bb7c02a --- /dev/null +++ b/app/templates/visualization.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% import 'bootstrap/wtf.html' as wtf %} + +{% block app_content %} +

Dataset visualization

+Image Placeholder +Image Placeholder +

Back

+{% endblock %}