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
Post a Comment