title: Correct way to insert Many-to-Many objects in Django?
body: <p>I was working on a many-to-many model with extra fields and i saw the documentation
  <a href="http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships" rel="nofollow noreferrer">for extra fields in many to many relations</a></p>
  
  <p>on their exemple, to create a membership they use </p>
  
  <pre><code>m2 = Membership.objects.create(person=paul, group=beatles,date_joined=date(1960, 8, 1), invite_reason= "Wanted to form a band.")
  </code></pre>
  
  <p>but that means that they already have the "person" and "group" instances. Normally working in websites we have the id's of the objects... so to create a membership i'd have to do:</p>
  
  <pre><code>person = Person.objects.get(pk=idPerson)
  group = Group.objects.get(pk=idgroup)
  </code></pre>
  
  <p>Now, correct me if i'm wrong but aren't we consulting pointlessly the database two times before the insert? because, all we need in the Membership is the foreign key id's and not the whole object...
  maybe there's another way to insert in a many-to-many relation using only the id's</p>