title: specify annotate field on subtables
body: <p>I have a parent table <code>Image</code> and subtable <code>Resized_image</code>, so I have stored <code>images</code> data in <code>resized_image</code> table. I want to filter the data using aspect ratio.</p>
  
  <p>This is my model:</p>
  
  <pre><code> class Image(models.Model):
          name=models.CharField(max_length=40,unique=False)
   class Resized_image(models.Model):
          img = models.ForeignKey(Image, related_name='images', on_delete=models.CASCADE)
          image=models.ImageField(upload_to=config.date_format,width_field='width', height_field='height',)
          width=models.PositiveIntegerField(null=True, blank=False, editable=False)
          height=models.PositiveIntegerField(null=True, blank=False, editable=False)
          size=models.IntegerField(null=True, blank=False,editable=False)
          status = models.CharField(max_length=30, default='inserted')
  
          class Meta:
              db_table = 'resized_images'
  
          def __str__(self):
              return self.status
  
      def save(self,force_insert=False, force_update=False, using=None):
          if not self.image:
              return  
  
          super(Resized_image, self).save()
          self.size = os.stat(str(self.image)).st_size
          super(Resized_image, self).save()
  </code></pre>
  
  <p>This is my view:</p>
  
  <pre><code>class ImagePostAPIView(mixins.CreateModelMixin,generics.ListAPIView):
      queryset = Image.objects.all()
      serializer_class = imagesSerializer
  
  def get(self, request):
          print("inside get views.py")
          return super(mixins.CreateModelMixin,self).get(request)
  def myfilter(self, queryset, queryparam, queryarg):
          param = self.request.query_params.get(queryparam, None)
          #print("param",param)
          if param is not None:
              try:
                  newarg = {queryarg : int(param)}
                  #print("newarg",newarg)
                  queryset = queryset.filter(**newarg)
              except ValueError:
                  pass
          return queryset
  def get_queryset(self):
   queryset = Image.objects.all() 
   queryset = self.myfilter(queryset, 'minheight', 'images__height__gte')
          queryset = self.myfilter(queryset, 'maxheight', 'images__height__lte')
  </code></pre>
  
  <p>here I am filtering data in <code>GET</code> request using <code>minheight</code> which is present in <code>Resized_image</code> table similarly I want to filter data using aspect ratio i.e., I want to add <code>aspect_ratio</code> field using <code>table_name.objects.annotate</code> and then filter the data... How can i do that??</p>