From b6a99e246f5552c4c11593febbc2dd10e5ba03d4 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Fri, 15 Apr 2022 16:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 972492b..e0b8b2c 100644 --- a/app.py +++ b/app.py @@ -11,12 +11,17 @@ app = Flask(__name__) app.config['JSON_AS_ASCII'] = False # CORS(app, supports_credentials=True) app.debug = True -load_config() app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///database.db?check_same_thread=False" app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True app.config['SQLALCHEMY_ECHO'] = True db.init_app(app) + +@app.before_first_request +def _load_config(): + load_config() + + app.register_blueprint(view_main_blueprint) app.register_blueprint(api_config_blueprint) app.register_blueprint(api_collector_blueprint)