Take the 2-minute tour ×

I have 2 Django projects with their own databases. I want to have few models same in both databases. One app will only read those models and it cannot write new items. What is the best way to have fresh data in that app? Maybe through REST api, or database replication? Thank you in advance!

share|improve this question
I guess you mean "projects" instead of "apps"? Would it be possible for both apps two have access to both databases? –  Bernhard Vallant May 20 '13 at 14:41
yes, projects. sorry. no, it is not possible. –  vladotg May 20 '13 at 14:45
add comment

1 Answer

If you want to synchronize the data fast and efficient between two databases replication is for sure the way to go... Don't know if you are using MySQL or Postgres, but for both solutions exist...

If you can access both databases from both projects you can also look into Django's support for multiple databases.

If both of this options are not possible you could also try to create something like an Rest-API on one side and access it via the web. Don't know what kind of data you want to share, if you need the data for authentication you'll also find some solutions for that...

share|improve this answer
thanks. Maybe the solution can be this - one side checks every night for changes on other side, and then do that changes in own database. I just dont know what is the best way to log changes and check for them? –  vladotg May 20 '13 at 15:15
Well I don't know certain circumstances: How can you "connect" the databases? (same data center?)... Some more detailled description about the data you want to share? (actuality/type etc) –  Bernhard Vallant May 20 '13 at 16:14
add comment

Your Answer


