title: Double-nested serializers with Django Rest Framework
body: <p>Is this possible with DRF using ModelSerializers? I'm mostly interested in seeing an example to reproduce if possible.</p>
  
  <p>Here are my models:</p>
  
  <pre><code>class Grandparent(Model):
      g_name = CharField(max_length=10)
      parent = ForeignKey('Parent')
  
  class Parent(Model):
      p_name = CharField(max_length=10)
      child = ForeignKey('Child')
  
  class Child(Model):
      c_name = CharField(max_length=10)
  </code></pre>
  
  <p>Here are my serializers:</p>
  
  <pre><code>class ChildSerializer(serializers.ModelSerializer):
      class Meta:
          model = models.Child
          fields = ('id', 'c_name')
  
  class ParentSerializer(serializers.ModelSerializer):
      child = ChildSerializer()
  
      def create(self, validated_data):
          child_data = validated_data.pop('child')
          child, _ = models.Child.objects.get_or_create(**child_data)
          return models.Parent.objects.create(child=child, **validated_data)
  
      class Meta:
          model = models.Parent
          fields = ('id', 'p_name', 'child')
  
  class GrandparentSerializer(serializers.ModelSerializer):
      parent = ParentSerializer()
  
      class Meta:
          model = models.Grandparent
          fields = ('id', 'g_name', 'parent')
  </code></pre>
  
  <p>Here is my grandparent view:</p>
  
  <pre><code>class GrandparentList(generics.ListCreateAPIView):
      queryset = models.Grandparent.objects.all()
      serializer_class = serializers.GrandparentSerializer
  </code></pre>
  
  <p>Here is the error I get when I try to post to the Grandparent view:</p>
  
  <blockquote>
    <p>AttributeError at /grandparents/ 'list' object has no attribute 'get'</p>
  </blockquote>