Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (2.6k points)

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 models to use multiple databases with __bind_key__ seems pretty straightforward.

However, it doesn't seem to be working for me.

1 Answer

0 votes
by (7.2k points)

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

This was not working because of a simple typo:

__bind_key = 'db1'

Should have been

__bind_key__ = 'db1'

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
4 answers
asked Mar 10, 2021 in SQL by rahulnayar01123 (6.1k points)
0 votes
1 answer

Browse Categories

...