摘要: 本文为解决pycharm中python shell操作数据库报错:RuntimeError: No application found. Either work inside a view function or push an application context. init文件: def cr 阅读全文
posted @ 2019-05-02 19:26 zju_cxl 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 当数据库不在需要时(如表中参照性完整性、实体性完整性和用户自定义完整性需要修改的时候)(相当于drop数据库),我们可以利用migrate来重建数据库,而不需要去数据库中写原生SQL语句来建立数据库。 1、python manage.py db init 2、python manage.py db 阅读全文
posted @ 2019-05-02 18:57 zju_cxl 阅读(73) 评论(0) 推荐(0) 编辑