修改数据库初始化逻辑,完善权限,废弃flaskenv

This commit is contained in:
不胜舟
2023-04-06 16:09:49 +08:00
parent 269cc154ab
commit bced84f92d
27 changed files with 995 additions and 675 deletions
+18
View File
@@ -0,0 +1,18 @@
import click
from applications import admin_cli
from applications.common.script.newmodular.new import NewViewModular
@admin_cli.command()
@click.option('--type', prompt="请输入类型", help='新增的类型')
@click.option('--name', prompt="请输入新增的名称", help='新增的名称')
def new(type, name):
if type == 'view':
if name.count('/') > 1:
print("目前只支持二级目录,多级目录需要蓝图嵌套,本命令暂不支持,请手动创建")
quit()
if type == "view" and os.path.exists(f"applications/view/{name}.py"):
print(f'已经存在视图模块{name}.py')
quit()
NewViewModular(name=name).new_view()