1.定义蓝图(app/admin/__init__.py)
from flask import Blueprint admin = Blueprint("admin", __name__) import views
2.注册蓝图(app/__init__.py)
from admin import admin as admin_blueprint app.register_blueprint(admin_blueprint, url_prefix="/admin")
3.调用蓝图(app/admin/views.py)
from . import admin @admin.route("/")