|
|
@ -37,6 +37,8 @@ import core.mw as mw |
|
|
|
import config |
|
|
|
import config |
|
|
|
import utils.config as utils_config |
|
|
|
import utils.config as utils_config |
|
|
|
import thisdb |
|
|
|
import thisdb |
|
|
|
|
|
|
|
# 初始化db |
|
|
|
|
|
|
|
setup.init() |
|
|
|
|
|
|
|
|
|
|
|
# from threading import Lock |
|
|
|
# from threading import Lock |
|
|
|
# thread = None |
|
|
|
# thread = None |
|
|
@ -67,9 +69,6 @@ app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=31) |
|
|
|
# app.config['SQLALCHEMY_DATABASE_URI'] = mw.getSqitePrefix()+config.SQLITE_PATH+"?timeout=20" # 使用 SQLite 数据库 |
|
|
|
# app.config['SQLALCHEMY_DATABASE_URI'] = mw.getSqitePrefix()+config.SQLITE_PATH+"?timeout=20" # 使用 SQLite 数据库 |
|
|
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True |
|
|
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True |
|
|
|
|
|
|
|
|
|
|
|
# 初始化db |
|
|
|
|
|
|
|
setup.init() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# BASIC AUTH |
|
|
|
# BASIC AUTH |
|
|
|
app.config['BASIC_AUTH_OPEN'] = False |
|
|
|
app.config['BASIC_AUTH_OPEN'] = False |
|
|
|
try: |
|
|
|
try: |
|
|
|