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, then what do you do then?
You wouldn’t need a REST api to do whatever your case is. Django supports using multiple database; just check their doc with a google search. It’s just a lot more business logic, and in my opinion, a lot more work and inefficiency. On Fri, Jun 21, 2019 at 7:25 AM anilkumar sangu <sangu.anilku...@gmail.com> wrote: > 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 dynamically. how to achieve this in Django Rest Api > > Thanks in advance > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/50a8fe84-0966-4b2c-bcf4-725f75a78609%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/50a8fe84-0966-4b2c-bcf4-725f75a78609%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJVmkN%3DW_Mk7L_zRMLZ8xwF5h4%2BPsDQE0jfamPBJS%2Br9mA%3D%2BNQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.