Configuring Flask-SQLAlchemy to use multiple databases with Flask-Restless

后端 未结 1 1940
广开言路
广开言路 2020-12-28 17:25

I have a Flask app that uses Flask-SQLAlchemy and I\'m trying to configure it to use multiple databases with the Flask-Restless package.

According to the docs, confi

相关标签:
1条回答
  • 2020-12-28 18:05

    This was not working because of a simple typo:

    __bind_key = 'db1'
    

    Should have been

    __bind_key__ = 'db1'
    

    I've updated the original question and fixed the typo as an example of how this can work for others.

    0 讨论(0)
提交回复
热议问题