from flask import Flask from flask_sqlalchemy import SQLAlchemy from .config import BaseConfig # 导入配置文件 app = Flask(__name__) app.config.from_object(BaseConfig) # 启用配置 db = SQLAlchemy() db.init_app(app) # 初始化数据库 # 导入路由配置 from app import routes from app import general from .school.index import * app.register_blueprint(s)