Skip to content Skip to sidebar Skip to footer

Configuring Flask-sqlalchemy To Use Multiple Databases With Flask-restless

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, configuring your mode

Solution 1:

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.

Post a Comment for "Configuring Flask-sqlalchemy To Use Multiple Databases With Flask-restless"