Saturday, 31 August 2013

multiple databases and multiple models in django

multiple databases and multiple models in django

I have two databases and two models:one the admin and the is user.
I want to sync my models to the two databases; admin model to database A
and user model to database B;
If I setting the model path to INSTALLED_APPS and syncdb,the two models
will sync to the default database.
if I setting the database in syncdb command such as sync
--database="B",and the two models will sync to database B.
so my problem the how to sync the two models to two databases?

No comments:

Post a Comment