Added custom 404 display and login redirect
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from datetime import datetime
|
||||
|
||||
from flask import Flask, flash, request
|
||||
from flask import Flask, flash, request, render_template
|
||||
from flask.helpers import url_for
|
||||
from flask.json import jsonify
|
||||
from flask_bootstrap import Bootstrap
|
||||
@@ -77,4 +77,8 @@ if __name__ == '__main__':
|
||||
def _get_id_from_cookie():
|
||||
return dict(get_id_from_cookie = get_id_from_cookie)
|
||||
|
||||
@app.errorhandler(404)
|
||||
def _404_handler(e):
|
||||
return render_template('/quiz/404.html'), 404
|
||||
|
||||
app.run(host=app.config['APP_HOST'])
|
Reference in New Issue
Block a user