mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
AAAA
This commit is contained in:
parent
b30e336ae6
commit
d9714da918
4 changed files with 14 additions and 10 deletions
|
@ -56,7 +56,7 @@ def create_app(): # pylint: disable=R0914
|
|||
print(
|
||||
"""
|
||||
####################################################
|
||||
# DEFAULY ADMIN USER GENERATED WITH GIVEN USERNAME #
|
||||
# DEFAULT ADMIN USER GENERATED WITH GIVEN USERNAME #
|
||||
# THE DEFAULT PASSWORD "changeme!" HAS BEEN USED, #
|
||||
# PLEASE UPDATE IT IN THE SETTINGS! #
|
||||
####################################################
|
||||
|
@ -76,18 +76,18 @@ def create_app(): # pylint: disable=R0914
|
|||
login_manager.login_view = "onlylegs.index"
|
||||
|
||||
@login_manager.user_loader
|
||||
def load_user(user_id): # skipcq: PTC-W0065
|
||||
def load_user(user_id):
|
||||
return User.query.filter_by(alt_id=user_id).first()
|
||||
|
||||
@login_manager.unauthorized_handler
|
||||
def unauthorized(): # skipcq: PTC-W0065
|
||||
def unauthorized():
|
||||
error = 401
|
||||
msg = "You are not authorized to view this page!!!!"
|
||||
return render_template("error.html", error=error, msg=msg), error
|
||||
|
||||
# ERROR HANDLERS
|
||||
@app.errorhandler(Exception)
|
||||
def error_page(err): # skipcq: PTC-W0065
|
||||
def error_page(err):
|
||||
"""
|
||||
Error handlers, if the error is not a HTTP error, return 500
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue