On Sun, Aug 16, 2009 at 11:44 AM, Haes<haes...@gmail.com> wrote: > > Hi, > > we are using master / slave database replication, no partitioning, > just replicating the complete database to several slaves for > performance reasons. This is making some problems with a newly > developed Django project, which makes use of an existing database. > > Is there an (easy) way to use a different database for the admin > application (master db) than for the remaining apps (slave db)? > > If I'd need more fine grained control about what database connection > I'd like to use in a view, would I need to write a custom db backend > for that? Or is there a way to set up two database connections and > switch them manually (django.db.connection = <slave>)? >
Take a look at django-multidb on github[1]. Django's own Multi-DB-API, which is being developed by Alex Gaynor as part of the Google Summer of Code is not ready yet, but seems to come along nicely. [1]: http://github.com/mmalone/django-multidb/tree/master -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---