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

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

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