1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 20:55:10 +01:00

Custom 404 page

This commit is contained in:
2016-07-22 09:40:09 +02:00
parent 3e410e0a7a
commit 974d5146f5
2 changed files with 11 additions and 0 deletions

View File

@@ -172,6 +172,11 @@ def get_tags_for_user(userkey):
return clean_tags(tags) return clean_tags(tags)
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
@app.route('/') @app.route('/')
def index(): def index():
""" Homepage, point visitors to project page """ """ Homepage, point visitors to project page """

6
templates/404.html Normal file
View File

@@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block title %}404: Page not found{% endblock %}
{% block pageheader %}404: Page not found{% endblock %}
{% block pagecontent %}
The page you requested was not found.
{% endblock %}