title: Adding extra field with Many to many relationship in DRF
body: <p>I have scenario where I need to add the  extra field with the ManytoMany relationship. But when I am trying to do so I am getting the error.</p>
  <p>My model class is as:</p>
  <pre><code>class Person(models.Model):
      name = models.CharField(max_length=128)
  
      def __unicode__(self):
          return self.name
  
  class Group(models.Model):
      quantity = models.IntegerField()
      members = models.ForeignKey(Person,on_delete=models.CASCADE)
  
  
  class Membership(models.Model):
      code = models.CharField(max_length=64)
      group = models.ManyToManyField(Person, through='Group')
      date_joined = models.DateField()
      invite_reason = models.CharField(max_length=64)
  </code></pre>
  <p>What I am looking here is in a Membership modal I want my code to be unique and in group I want the multiple person with quantity but something I am doing wrong and I am getting the error and my error is :</p>
  <pre><code>The model is used as an intermediate model by 'oss.Membership.group', but it does not have a foreign key to 'Membership' or 'Person'.
  </code></pre>
  <p>Any suggestions will be of great help. Thanks in advance</p>