flask_script扩展包的作用

Manager数据库迁移的管理器, 要进行数据库迁移,必须使用:

1:实例化管理器对象 manager= Manager(app)

2:使用迁移框架:Migrate(app,db)

3: manager.add_command('db',MifrateCommand)

 

并且可以使当前程序在终端中运行,需要配置环境 : Edit 中 添加 Script parameters : runserver 启动

在终端中输入 ; python xxx.py runserver -h(指定ip)/-p(指定端口号)

posted @ 2018-06-08 18:48  exchange<>  阅读(156)  评论(0编辑  收藏  举报