multidb model binds

classic Classic list List threaded Threaded
1 message Options
vcc
Reply | Threaded
Open this post in threaded view
|

multidb model binds

vcc

I update the http://github.com/weigj/django-multidb/tree , add support
to model binds, like this:

# settings.py
MODEL_BINDS = {
    'hello.*':'db1',
    'django.contrib.*':'db2',
}

I think this is most easy way  bind model to db, and I also think
about connection manage for master-slaver and sharding, may look like
this:

#settings.py
CONNECTION_MANAGE = dict(
    MASTER_SLAVER = [
         {'master':db1,'slaver':['db2','db3',....]}
     ],
    SHARD = [
         ['chooser':my_sharding_chooser,'db':[....],'model':[....]],
    ]
)

Any suggest?

Regards,

Wei guangjing



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---