There really isn’t any point in doing that. 1) You should just use one of
the two. Django officially supports Postgres. 2) You’d want to keep your
users all jumbled in one database. If you have a foreign key to the
username field, and the db can’t find a specific user because it’s in the
other db,
If it is one time selection like storing in a user level settings, you can
store the database to use in user model
i.e. you have to customize default Usermodel in django and add one extra
field to store the db type of the current user.
Then access the right db
Hello,
I am working on Django
I have a scenario like
I want to connect multiple databases. based on user selection. if user
selects MySql from front end my Api could able to connect MySql. if user
select postgreSql my api could able to connect to postgreSql based on user
selection
3 matches
Mail list logo