[Answer]-Django postres methods for external Database

1๐Ÿ‘

I believe if you want to use Django methods (and not simply use RAW SQL queries and parse them) you will have to use the settings.py method and define all your databases there.

https://docs.djangoproject.com/en/1.7/topics/db/multi-db/

In short, you define a database and can manually chose it in your code via (as per docs):

Author.objects.using(database_name_variable).filter(...)

An alternative would be to look at using REST api (like Tastypie) to make calls to different Django instances connected to each database.

๐Ÿ‘คwarath-coder

Leave a comment