I'm new to django and try to figure out what would be the best solution for me to use dynamically multiple databases in django. I know django is able to work with multiple databases registered in the settings.py file but In my case I have one main database (sqlite) which acts as my repository, I created all the models, the rest api viewsets for this one.
The user can choose to connect to an Oracle database by entering the connection information and then I will need to gather data from this database and insert it to my repository. The user can register multiple Oracle databases through the app. I'm wondering if I should use a pure cx_Oracle class to handle those connection from django or if I should register them in the settings.py?
Each view in the frontend maps to a specific database and I will need to switch context between them, If I use a cx_Oracle class how can I route the requests to the right class instance in the backend?
Any help or insight would be appreciated, I didn't find anything matching my use case on the internet.