You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
556 B
Python
18 lines
556 B
Python
from iti.applications.extensions import broadcast_execute
|
|
from iti.applications.routes.sys import register_sys_bp
|
|
from iti.applications.routes.index import bp as index_bp
|
|
from iti.applications.routes.front import bp as frontend_bp
|
|
|
|
def init_routes(app):
|
|
# 蓝图注册
|
|
app.register_blueprint(index_bp)
|
|
# 前端路由注册(可选)
|
|
if app.config.get("FRONTEND_ENABLED", False):
|
|
app.register_blueprint(frontend_bp)
|
|
|
|
# 系统蓝图注册
|
|
register_sys_bp(app)
|
|
|
|
# 插件初始化
|
|
broadcast_execute(app, "event_init")
|