1

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

For example, you can do:

b = Blog.objects.get(id=1)
e = Entry.objects.get(id=234)
b.entry_set.add(e) # Associates Entry e with Blog b.

When you call add, it automatically does a save. How do you pass keyword arguments to the save method that it calls? In my case, I want to pass using='my-other-db', force_insert=True to the save method, since I am in a multi-database environment.

Any ideas?

mlissner
  • 17,359
  • 18
  • 106
  • 169

0 Answers0