I have app1 and app2, I wanna app1 use db1 and app2 use db2
the approach I found is to using database router, a little bit complicated
I wanna know is there any simple way?
Can I just config it in settings.py
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. The correct way is to use routers. It is very simple. See
MyAppRouterin django’s documentation: https://docs.djangoproject.com/en/dev/topics/db/multi-db/#an-example: