Let's say the first page of the app has two links. Is it possible to pick the database depending on which link is clicked? The databases both have the same models, but different data. For example, let's say the application contains students for different colleges A and B. If link for A is clicked, then database for A is used which contains the students for college A. The entire application after this point should use database for college A.
I understand there are ways to work around this problem by just designing the databases differently, i.e. having a college field, and just filtering out students with the particular college affiliation. But I am hoping to find a solution using Django to just use two different databases.
.using('default')is not a realistic solution. Is there another way to pick databases dynamically?