Commit d733b070 authored by 崔为之's avatar 崔为之 💪🏽

Update project

parent 2f6009fa
......@@ -18,7 +18,7 @@ from application.extensions import init_plugs
from application.views import init_views
from application.script import init_script
from application.utils import make_celery
from application.common import config
from application.common import global_config as gc
def create_app() -> Flask:
......@@ -39,7 +39,8 @@ def create_app() -> Flask:
init_plugs(app)
# Set universal config
config.universal = app.config
# 将 app.config 的内容复制到全局对象
gc.config = app.config.copy()
# Register the routes that this application will respond to.
# This includes both the route URLs and the handlers for each route.
......
......@@ -10,4 +10,4 @@
# @Description :
"""
from .config import Config
from .universal import global_config
......@@ -6,17 +6,17 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/11 14:11
# @File : config.py
# @File : universal.py
# @Description :
"""
# config.py
class Config:
# universal.py
class GlobalConfig:
"""Configuration for the application."""
def __init__(self):
self.universal = None
self.config = {}
# This creates a global instance of the Config class
config = Config()
global_config = GlobalConfig()
......@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/3 19:43
# @File : config.py
# @File : universal.py
# @Description :
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment