- edc-web: Flask 项目骨架(设备管理、测试操作、测试信息三大页面) - edc_server: 升级子模块(tb_serialnet 透传支持) - docs: 测试工装EDC管理系统需求文档
21 lines
486 B
Python
21 lines
486 B
Python
"""Flask 应用工厂"""
|
|
|
|
from flask import Flask
|
|
from app.config import Config
|
|
|
|
|
|
def create_app() -> Flask:
|
|
app = Flask(__name__)
|
|
app.config.from_object(Config)
|
|
|
|
# 注册蓝图
|
|
from app.routes.devices import bp as devices_bp
|
|
from app.routes.test_op import bp as test_op_bp
|
|
from app.routes.test_data import bp as test_data_bp
|
|
|
|
app.register_blueprint(devices_bp)
|
|
app.register_blueprint(test_op_bp)
|
|
app.register_blueprint(test_data_bp)
|
|
|
|
return app
|