add: page not found redirect to /
This commit is contained in:
parent
161a7ff5b3
commit
d41e540d1f
4
main.py
4
main.py
@ -6,6 +6,10 @@ import home, login, panel, register, logout
|
||||
app = flask.Flask(__name__)
|
||||
app.secret_key = config.secret
|
||||
|
||||
@app.errorhandler(404)
|
||||
def not_found(e):
|
||||
return (flask.redirect("/"))
|
||||
|
||||
if (__name__ == "__main__"):
|
||||
app.register_blueprint(home.page)
|
||||
app.register_blueprint(login.page)
|
||||
|
Loading…
Reference in New Issue
Block a user