From 90f6b1c1101fb748f686afa1cc2a2b2de51a64d7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 23 Apr 2018 21:16:36 -0700 Subject: custom 404 --- fatcat/routes.py | 4 ++++ fatcat/templates/404.html | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 fatcat/templates/404.html diff --git a/fatcat/routes.py b/fatcat/routes.py index 24fd5b18..bc7d2821 100644 --- a/fatcat/routes.py +++ b/fatcat/routes.py @@ -92,6 +92,10 @@ def editor_changelog(username): ### Static Routes ########################################################### +@app.errorhandler(404) +def page_not_found(e): + return render_template('404.html'), 404 + @app.route('/', methods=['GET']) def homepage(): return render_template('home.html') diff --git a/fatcat/templates/404.html b/fatcat/templates/404.html new file mode 100644 index 00000000..c8fbfeac --- /dev/null +++ b/fatcat/templates/404.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% block body %} + +

404: Not Found

+ +{% endblock %} -- cgit v1.2.3