aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-23 21:16:36 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-23 21:16:36 -0700
commit90f6b1c1101fb748f686afa1cc2a2b2de51a64d7 (patch)
treefd8108f566a444bba1fb54e2e56dcdf8c45938d7
parent1892c27476181daaa3f72022e5bbdf87e2dbd4d0 (diff)
downloadfatcat-90f6b1c1101fb748f686afa1cc2a2b2de51a64d7.tar.gz
fatcat-90f6b1c1101fb748f686afa1cc2a2b2de51a64d7.zip
custom 404
-rw-r--r--fatcat/routes.py4
-rw-r--r--fatcat/templates/404.html6
2 files changed, 10 insertions, 0 deletions
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 %}
+
+<h1>404: Not Found</h1>
+
+{% endblock %}