This website works better with JavaScript.
Home
Help
Sign In
ben
/
calefaction
mirror of
https://github.com/earwig/calefaction
Watch
1
Star
1
Fork
0
Code
Releases
0
Activity
Browse Source
Add custom 404.
master
Ben Kurtovic
8 years ago
parent
8aece18afa
commit
52ffd35abc
2 changed files
with
10 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
app.py
+6
-0
templates/404.mako
+ 4
- 0
app.py
View File
@@ -84,5 +84,9 @@ def set_style(style):
abort(404)
return "", 204
@app.errorhandler(404)
def page_not_found(err):
return render_template("404.mako"), 404
if __name__ == "__main__":
app.run(debug=True, port=8080)
+ 6
- 0
templates/404.mako
View File
@@ -0,0 +1,6 @@
<%inherit file="_base.mako"/>
<%block name="title">
404 – ${g.config.get("corp.name") | h}
</%block>
<h1>Error 404</h1>
<p>The page you asked for couldn't be found.</p>
Write
Preview
Loading…
Cancel
Save