10 Star 66 Fork 36

陈乾/TLv8-Flask-layui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
__init__.py 965 Bytes
一键复制 编辑 原始数据 按行查看 历史
# _*_ Coding:utf-8 _*_
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config import config
import flask_excel as excel
db = SQLAlchemy()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
db.init_app(app)
# 注册蓝图
from app.home import home as home_blueprint
from app.sa import system as system_blueprint
from app.flow import flow as flow_blueprint
from app.oa import oa as oa_blueprint
app.register_blueprint(home_blueprint) # 登录页、首页
app.register_blueprint(system_blueprint, url_prefix="/system") # 系统管理模块
app.register_blueprint(flow_blueprint, url_prefix="/flowControl") # 流程控制模块
app.register_blueprint(oa_blueprint, url_prefix="/oa") # 业务模块(OA) 添加其他业务模块可以参考OA
# 初始化Excel包
excel.init_excel(app)
return app
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/qianpou/tlv8-python-flask.git
git@gitee.com:qianpou/tlv8-python-flask.git
qianpou
tlv8-python-flask
TLv8-Flask-layui
master

搜索帮助

371d5123 14472233 46e8bd33 14472233