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 * from .file.index import * from .antispider.index import * from .csdn.index import * from .slow.index import * app.register_blueprint(s) app.register_blueprint(f) app.register_blueprint(antispider) app.register_blueprint(cs) app.register_blueprint(slow)