title: Include intermediary (through model) in responses in Django Rest Framework
body: <p>I have a question about dealing with m2m / through models and their presentation in django rest framework. Let's take a classic example:</p>
  
  <p>models.py:</p>
  
  <pre><code>from django.db import models
  
  class Member(models.Model):
      name = models.CharField(max_length = 20)
      groups = models.ManyToManyField('Group', through = 'Membership')
  
  class Group(models.Model):
      name = models.CharField(max_length = 20)
  
  class Membership(models.Model):
      member = models.ForeignKey('Member')
      group = models.ForeignKey('Group')
      join_date = models.DateTimeField()
  </code></pre>
  
  <p>serializers.py:</p>
  
  <pre><code>imports...
  
  class MemberSerializer(ModelSerializer):
      class Meta:
          model = Member
  
  class GroupSerializer(ModelSerializer):
      class Meta:
          model = Group
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>imports...
  
  class MemberViewSet(ModelViewSet):
      queryset = Member.objects.all()
      serializer_class = MemberSerializer
  
  class GroupViewSet(ModelViewSet):
      queryset = Group.objects.all()
      serializer_class = GroupSerializer
  </code></pre>
  
  <p>When GETing an instance of Member, I successfully receive all of the member's fields and also its groups - however I only get the groups' details, without extra details that comes from the Membership model.</p>
  
  <p>In other words I <strong>expect</strong> to receive:</p>
  
  <pre><code>{
     'id' : 2,
     'name' : 'some member',
     'groups' : [
        {
           'id' : 55,
           'name' : 'group 1'
           'join_date' : 34151564
        },
        {
           'id' : 56,
           'name' : 'group 2'
           'join_date' : 11200299
        }
     ]
  }
  </code></pre>
  
  <p>Note the <strong>join_date</strong>.</p>
  
  <p>I have tried oh so many solutions, including of course <a href="http://www.django-rest-framework.org/api-guide/relations/#manytomanyfields-with-a-through-model" rel="noreferrer">Django Rest-Framework official page about it</a> and no one seems to give a proper plain answer about it - what do I need to do to include these extra fields? I found it more straight-forward with django-tastypie but had some other problems and prefer rest-framework.</p>