title: How to serialize result of objects.filter django based on foreign key object
body: <p>I have two models one with a foreign key to the other: </p>
  
  <pre><code>class Booking(models.Model):
  
  type_course_requested = models.ManyToManyField(TypePost, blank=True)
      .....
      #Presentation Message
  
      message = models.CharField(max_length=1000)
  
  class BookingDemand(models.Model):
  
      booking = models.ForeignKey(Booking, on_delete=models.CASCADE, null=True, blank=True)
  </code></pre>
  
  <p>I want to get bookingdemands based on certain condition, and then serializing to have something like the code below: </p>
  
  <pre><code>{ 'booking1': { 'key1':...
                 'bookingDemands': {....}
               }, 
    'booking2': {...}
  }
  </code></pre>
  
  <p>Filtering is done like this: </p>
  
  <pre><code>bookings=BookingDemand.objects.filter(booking__post__person=self.request.user)
  </code></pre>
  
  <p>which returns a queryset, but I can't find how to serialize them to have each booking separatly as mentionned above. </p>