关于使用SQLALCHEMY 出现warning 的问题解决
出现错误:
D:\Python27\lib\site-packages\flask_sqlalchemy\__init__.py:794: 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 '
-
解决方案:
配置文件增加以下内容:(config.py) -
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_COMMIT_TEARDOWN = True