添加半成品页面进行数据
This commit is contained in:
@ -1,18 +1,22 @@
|
||||
from flask import Blueprint
|
||||
|
||||
# 1. 导入同目录下的 buy 模块 (假设文件名为 buy.py)
|
||||
# 1. 导入子模块蓝图
|
||||
# 注意:确保 .buy, .semi, .base 文件在同级目录下真实存在
|
||||
from .buy import inbound_buy_bp
|
||||
from .semi import inbound_semi_bp
|
||||
|
||||
# 2. 【关键修改】导入同目录下的 base 模块
|
||||
# 使用相对导入 .base,这样 Python 就会去 app/api/v1/inbound/base.py 找
|
||||
# 如果你还有 base.py 文件,就取消注释下面这行
|
||||
from .base import inbound_base_bp
|
||||
|
||||
# 创建父级蓝图 'inbound'
|
||||
# 2. 创建父级聚合蓝图
|
||||
inbound_bp = Blueprint('inbound', __name__)
|
||||
|
||||
# 3. 挂载子蓝图
|
||||
# 最终路由将是: /api/v1/inbound/buy/...
|
||||
# 访问地址: /api/v1/inbound/buy/list
|
||||
inbound_bp.register_blueprint(inbound_buy_bp, url_prefix='/buy')
|
||||
|
||||
# 最终路由将是: /api/v1/inbound/base/...
|
||||
# 访问地址: /api/v1/inbound/semi/list
|
||||
inbound_bp.register_blueprint(inbound_semi_bp, url_prefix='/semi')
|
||||
|
||||
# 如果有 base
|
||||
inbound_bp.register_blueprint(inbound_base_bp, url_prefix='/base')
|
||||
Reference in New Issue
Block a user