#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 12:11 # @File : __init__.py # @Description : """ import os from flask import Flask from application.extensions import init_plugs from application.views import init_views from application.script import init_script def create_app() -> Flask: app = Flask(os.path.abspath(os.path.join(os.path.dirname(__file__), "."))) # 注册各种插件 init_plugs(app) # 注册路由 init_views(app) # 注册命令 init_script(app) return app