title: Adding foreign key data to serializer?
body: <p>I'm trying to use the Django Rest-Framework to produce some JSON that shows all the user's posts, but also shows the images for that post. Image is a foreign key to Post. Here are the models:</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>  class Post(models.Model):
          user            = models.ForeignKey(User, on_delete=models.CASCADE)
          status          = models.CharField(max_length=200)
  
  
      class Image(models.Model):
          post        = models.ForeignKey(Post, on_delete=models.CASCADE)
          img         = models.CharField(max_length=120)
          views_count = models.IntegerField(default=0)
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class GetPosts(ListAPIView):
      serializer_class = PostSerializer
  
      def get_queryset(self):
          requested_user = get_requested_user(self)
          return Post.objects.filter(user=requested_user).order_by('-created_at')
  
  def get_requested_user(self):
      filter_kwargs = {'username': self.kwargs['username']}
      return get_object_or_404(User.objects.all(), **filter_kwargs)
  </code></pre>
  
  <p><strong>serializers.py</strong></p>
  
  <pre><code>class PostSerializer(serializers.ModelSerializer):
      image_img = serializers.RelatedField(source='Image', read_only=True)
      class Meta:
          model = Post
          fields = ('status', 'image_img ')
  </code></pre>
  
  <p>In the serializers.py, I'd like to show <strong>all</strong> of the fields for Image (<code>img, views_count</code>) What I get with my current code is this: </p>
  
  <pre><code>{
      "count": 1,
      "next": null,
      "previous": null,
      "results": [
          {
              "status": "I am number 1"
          }
      ]
  }
  </code></pre>
  
  <p>Which contains the user's posts, but not the user's posts and each post's images. Note: Query url looks like this: /api/posts/user/</p>