diff --git a/var/www/Flask_server.py b/var/www/Flask_server.py index 09f9ff41..a47264ee 100755 --- a/var/www/Flask_server.py +++ b/var/www/Flask_server.py @@ -224,6 +224,13 @@ def role(): def searchbox(): return render_template("searchbox.html") +# ========== ERROR HANDLER ============ + +@app.errorhandler(404) +@login_required +def page_not_found(e): + # note that we set the 404 status explicitly + return render_template('error/404.html'), 404 # ========== INITIAL taxonomies ============ # add default ail taxonomies diff --git a/var/www/templates/error/404.html b/var/www/templates/error/404.html new file mode 100644 index 00000000..9b25da48 --- /dev/null +++ b/var/www/templates/error/404.html @@ -0,0 +1,40 @@ + + + +
++ ,d8 ,a8888a, ,d8 + ,d888 ,8P"' `"Y8, ,d888 + ,d8" 88 ,8P Y8, ,d8" 88 + ,d8" 88 88 88 ,d8" 88 +,d8" 88 88 88 ,d8" 88 +8888888888888 `8b d8' 8888888888888 + 88 `8ba, ,ad8' 88 + 88 "Y8888P" 88 ++