原创 

SQLAchemy No application found. Either work inside a view function or push 错误处理

分类:    367人阅读    IT小君  2018-06-17 18:22

refrence: https://stackoverflow.com/questions/49089584/sqlachemy-no-application-found-either-work-inside-a-view-function-or-push

key point:

app = Flask(__name__)
app.config.from_object(config)
with app.app_context():
    db.init_app(app)
    ma.init_app(app)
    db.create_all()


支付宝打赏 微信打赏

如果文章对你有帮助,欢迎点击上方按钮打赏作者

 工具推荐 更多»