Quantcast
Channel: Django manually select multiple databases - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Django manually select multiple databases

$
0
0

Well, after reading the doc https://docs.djangoproject.com/en/1.6/topics/db/multi-db/

I understand the way that developer can manually select database for selecting, saving and deleting. My question is that is there a more easy way for doing that?

I mean does django have something like its transaction management?

with transaction.atomic():
    do_something()

So all the code under a particular section are in one transaction that talking to one particular database, like

with using(default):
    do_something()

If django doesn't have this kind of wrapper, is there any good way to achieve what I described?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images