Update __init__.py

pull/632/head
Mr Chen 6 months ago
parent 8f0be8a475
commit 0b6cdec4ce
  1. 10
      web/admin/__init__.py

@ -99,9 +99,13 @@ setup.init_db_system()
app.config['BASIC_AUTH_OPEN'] = False app.config['BASIC_AUTH_OPEN'] = False
with app.app_context(): with app.app_context():
basic_auth = model.getOptionByJson('basic_auth', default={'open':False}) try:
if basic_auth['open']: basic_auth = model.getOptionByJson('basic_auth', default={'open':False})
app.config['BASIC_AUTH_OPEN'] = True if basic_auth['open']:
app.config['BASIC_AUTH_OPEN'] = True
except Exception as e:
pass
# 加载模块 # 加载模块

Loading…
Cancel
Save