mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2025-10-13 18:48:04 +00:00
@@ -75,14 +75,14 @@ def create_app():
|
||||
if cdclient is not None:
|
||||
cdclient.close()
|
||||
|
||||
@app.errorhandler(Exception)
|
||||
def handle_exception(e):
|
||||
app.logger.error(e)
|
||||
# pass through HTTP errors
|
||||
if isinstance(e, HTTPException):
|
||||
return e
|
||||
# now you're handling non-HTTP exceptions only
|
||||
return render_template("status_codes/500.html.j2", exception=e), 500
|
||||
# @app.errorhandler(Exception)
|
||||
# def handle_exception(e):
|
||||
# app.logger.error(e)
|
||||
# # pass through HTTP errors
|
||||
# if isinstance(e, HTTPException):
|
||||
# return e
|
||||
# # now you're handling non-HTTP exceptions only
|
||||
# return render_template("status_codes/500.html.j2", exception=e), 500
|
||||
|
||||
# add the commands to flask cli
|
||||
app.cli.add_command(init_db)
|
||||
@@ -193,7 +193,7 @@ def register_settings(app):
|
||||
'APP_DATABASE_URI',
|
||||
app.config['APP_DATABASE_URI']
|
||||
)
|
||||
if app.config['SECRET_KEY'] is "" or "<database>" in app.config['APP_DATABASE_URI']:
|
||||
if app.config['SECRET_KEY'] == "" or "<database>" in app.config['APP_DATABASE_URI']:
|
||||
raise("No database uri or secret Key")
|
||||
# try to get overides, otherwise just use what we have already
|
||||
app.config['USER_ENABLE_REGISTER'] = os.getenv(
|
||||
|
Reference in New Issue
Block a user