django - Model.add() in multiple database configuration -


the related manager has a method called add that, "adds specified model objects related object set."

for example, can do:

b = blog.objects.get(id=1) e = entry.objects.get(id=234) b.entry_set.add(e) # associates entry e blog b. 

when call add, automatically save. how pass keyword arguments save method calls? in case, want pass using='my-other-db', force_insert=true save method, since in multi-database environment.

any ideas?


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -