title: How to serialize a one to many relation in django-rest using Model serializer?
body: <p>These are my models and serializers. I want a representation of Question Model along with a list of people the question was asked to.</p>
  
  <p>I am trying this:</p>
  
  <pre><code>@api_view(['GET', 'PATCH'])
  def questions_by_id(request,user,pk):
      question = Question.objects.get(pk=pk)
      if request.method == 'GET':
          serializer = QuestionSerializer(question)
          return Response(serializer.data)
  </code></pre>
  
  <p>But I get an empty dictionary (<code>{}</code>). However when I remove the <code>asked</code> field from <code>QuestionSerializer</code> I get a complete representation of <code>Question</code> along with <code>Places</code> serialized nicely. What am I missing ?</p>
  
  <pre><code>class AskedToSerializer(serializers.ModelSerializer):
      class Meta:
          model = AskedTo
          fields = ('to_user', 'answered')
  
  class QuestionSerializer(serializers.ModelSerializer):
      class Meta:
          model = Question
          places = PlaceSerializer(many=True, required=False)
          asked = AskedToSerializer(source='askedto_set', many=True)
          fields = ('id', 'created_on', 'title', 'places', 'answered','asked')
          extra_kwargs = {'created_by': {'read_only': True}}
  
  class Question(BaseModel):
      title = models.CharField(max_length=200, null=False)
      places = models.ManyToManyField(Place, blank=True)
      answered = models.BooleanField(default=False)
  
  class AskedTo(BaseModel):
      ques = models.ForeignKey(Question, on_delete=models.CASCADE)
      to_user = models.ForeignKey(settings.AUTH_USER_MODEL)
      replied = models.BooleanField(default=False)
  
  
  class Place(models.Model):
      g_place_id = models.CharField(max_length=20,primary_key=True)
      json = models.TextField(null=True)
      name = models.CharField(max_length=40)
  </code></pre>