Beebol's 快乐分享

Beebol 一些生活和工作上的分享

【Flask-排错】Flask-SQLAlchemy 配置问题


报错信息

/opt/virtualenv/flask/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '

仔细看这个翻译

 SQLALCHEMY_TRACK_MODIFICATIONS  这个属性以后默认会是Disable的,如果需要用的话,自己手动设置成TrueFalse

解决办法

 直接根据自己的实际情况,设置SQLALCHEMY_TRACK_MODIFICATIONS的值为TrueFalse即可

官方配置说明文档

 http://flask-sqlalchemy.pocoo.org/2.1/config/

If set to True, Flask-SQLAlchemy will track modifications of objects and emit signals. The default is None, which enables tracking but issues a warning that it will be disabled by default in the future. This requires extra memory and should be disabled if not needed.



文章最后更新时间: 2017年06月12日 19:16:25


统计

今日PV:1174 今日UV:1150

文章总数:159 评论总数:7840

原创156 转载0 翻译3

分类文章统计

Django(5)

Flask(1)

Python常见错误(3)

Python基础(10)

shell(11)

linux排障(4)

虚拟化(1)

Consul(3)

Linux基础(6)

Redis(2)

oracle(10)

MySQL(64)

ProxySQL(7)

SequoiaDB(2)

TiDB(4)

常用软件(2)

硬件排障(2)

HTML(1)

JavaScript(1)

我们的作品(18)

windows(1)

总结(1)

按年文章统计

2013(43)

2014(19)

2015(25)

2016(6)

2017(30)

2018(7)

2019(17)

2020(4)

2021(4)

2023(1)

2024(3)

老版入口

IT OPer's 快乐分享

亲,扫我吧!
ITOpers
友情链接

飞哥的:imbusy.me/
冰川的:www.mindg.cn
海洋的:hiaero.net
宏斌的:techindeep.com
若水的:nosa.me
段郎的:sixther.me
肥客联邦:fk68.net