flask + SQLAlchemy设置读写分离
参考文档
https://www.jb51.net/article/174365.htm
https://gist.github.com/trustrachel/6828122#file-routing-py
步骤
在配置中添加以下配置
SQLALCHEMY_DATABASE_URI = 'xxx'
SQLALCHEMY_BINDS = {
'xxx',
'xx...
原创
2019-12-04 10:35:18 ·
1677 阅读 ·
2 评论