mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 19:45:12 +01:00
Custom 404 page
This commit is contained in:
@@ -172,6 +172,11 @@ def get_tags_for_user(userkey):
|
||||
return clean_tags(tags)
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return render_template('404.html'), 404
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
""" Homepage, point visitors to project page """
|
||||
|
||||
6
templates/404.html
Normal file
6
templates/404.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user