1 Star 0 Fork 2

TJDX1817054/cms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
starter.py 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
sunlin92 提交于 2021-01-18 00:21 . chore:调整项目结构
"""
:copyright: © 2020 by the Lin team.
:license: MIT, see LICENSE for more details.
"""
from app import create_app
from app.config.code_message import MESSAGE
from app.config.http_status_desc import DESC
from app.model.lin import (
Group,
GroupPermission,
Permission,
User,
UserGroup,
UserIdentity,
)
app = create_app(
group_model=Group,
user_model=User,
group_permission_model=GroupPermission,
permission_model=Permission,
identity_model=UserIdentity,
user_group_model=UserGroup,
config_MESSAGE=MESSAGE,
config_DESC=DESC,
)
if app.config.get("ENV") != "production":
@app.route("/")
def slogan():
return """
<style type="text/css">
* {
padding: 0;
margin: 0;
}
div {
padding: 4px 48px;
}
a {
color: black;
cursor: pointer;
text-decoration: none
}
a:hover {
text-decoration: None;
}
body {
background: #fff;
font-family:
"Century Gothic", "Microsoft yahei";
color: #333;
font-size: 18px;
}
h1 {
font-size: 100px;
font-weight: normal;
margin-bottom: 12px;
}
p {
line-height: 1.6em;
font-size: 42px
}
</style>
<div style="padding: 24px 48px;">
<p>
<a href="https://www.talelin.com" target="_Blank">Lin</a>
<br />
<span style="font-size:30px">
<a href="/apidoc/redoc">心上无垢</a>,<a href="/apidoc/swagger">林间有风</a>。
</span>
</p>
</div>
"""
if __name__ == "__main__":
app.logger.warning(
"""
----------------------------
| app.run() => flask run |
----------------------------
"""
)
app.run()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/tjdx1817054/cms.git
git@gitee.com:tjdx1817054/cms.git
tjdx1817054
cms
cms
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385