18 lines
563 B
Python
18 lines
563 B
Python
# 路由模块初始化
|
|
from flask import Blueprint
|
|
|
|
# 创建蓝图
|
|
users_bp = Blueprint('users', __name__, url_prefix='/api/v1/users')
|
|
teams_bp = Blueprint('teams', __name__, url_prefix='/api/v1/teams')
|
|
tenants_bp = Blueprint('tenants', __name__, url_prefix='/api/v1/tenants')
|
|
|
|
# 导入路由
|
|
from .users.routes import *
|
|
from .teams.routes import *
|
|
from .tenants.routes import *
|
|
|
|
def register_routes(app):
|
|
"""注册所有路由蓝图到应用"""
|
|
app.register_blueprint(users_bp)
|
|
app.register_blueprint(teams_bp)
|
|
app.register_blueprint(tenants_bp) |