Python flask_script 模块,Server() 实例源码
我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用flask_script.Server()。
def make_shell_context():
"""Create a python CLI.
return: Default import object
type: `Dict`
"""
# ????? Flask app object?????? CLI ???????? app ??
# ?????python manage.py shell ???app ?????
return dict(app=app,
db=models.db,
User=models.User,
Role=models.Role,
Post=models.Post,
Comment=models.Comment,
Tag=models.Tag,
Server=Server)