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

Update project

parent 9416fd84
......@@ -20,15 +20,29 @@ from application.script import init_script
def create_app() -> Flask:
app = Flask(os.path.abspath(os.path.join(os.path.dirname(__file__), ".")))
"""
This function creates and initializes a new Flask application.
# 注册各种插件
:return: A new instance of a Flask application.
"""
# Determine the path of the application root directory
app_root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "."))
# Create a new Flask application instance
app = Flask(app_root_path)
# Initialize various plugins for the application.
# This could include things like database connectors, authentication systems, etc.
init_plugs(app)
# 注册路由
# Register the routes that this application will respond to.
# This includes both the route URLs and the handlers for each route.
init_views(app)
# 注册命令
# Register any scripts or commands that can be run from the command line.
# This could include data migration scripts, administrative tasks, etc.
init_script(app)
# Return the fully initialized Flask application
return app
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