add custom 404 page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import Flask, session, request
|
||||
from flask import Flask, session, request, render_template
|
||||
from dotenv import load_dotenv
|
||||
from .models import Avatars, Users, PostHistory, Posts, MOTD
|
||||
from .auth import digest
|
||||
@@ -227,7 +227,7 @@ def create_app():
|
||||
elif request.path.startswith('/api/'):
|
||||
return {'error': 'not found'}, e.code
|
||||
else:
|
||||
return e
|
||||
return render_template('common/404.html'), e.code
|
||||
|
||||
# this only happens at build time but
|
||||
# build time is when updates are done anyway
|
||||
|
||||
Reference in New Issue
Block a user