1 Star 0 Fork 2

Logan/admin-express

forked from Stone/admin-express 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
manage.py 702 Bytes
一键复制 编辑 原始数据 按行查看 历史
Stone 提交于 2023-02-07 11:22 . add tinymce editor, optimize form layout,
import click
from app import create_app, db, models
app = create_app()
@app.shell_context_processor
def make_shell_context():
return dict(app=app, db=db, models=models)
@app.teardown_appcontext
def shutdown_session(exception=None):
# print('session closed.')
# db.session.remove()
pass
# @click.argument("name")
@app.cli.command('account-init')
def init_admin():
"""initiate admin account"""
print('begin to initialize admin account...')
from app.models import init_admin
init_admin()
from app.views import collect_views
collect_views()
click.echo('done!')
if __name__ == '__main__':
# db.create_all()
app.run(host='0.0.0.0', port=31008)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/logandev/admin-express.git
git@gitee.com:logandev/admin-express.git
logandev
admin-express
admin-express
master

搜索帮助