title: Django: Filter by calculated field
body: <p>In my Django project I need to calculate a date range for a trip to see if the trip is currently on its way.</p>
  
  <pre><code>class TourTemplate(models.Model):
      length = models.IntegerField()
      description = models.TextField(max_length=1000)
  ...
  
  class Trip(models.Model):
      tourtemplate = models.ForeignKey(TourTemplate)
      start = models.DateField()
  ...
  </code></pre>
  
  <p>I added this to my Trip model:</p>
  
  <pre><code>def end(self):
      length = self.tourtemplate.length
      start = self.start
      a = start + timedelta(days=length)
      return a
  </code></pre>
  
  <p>In the shell it works and returns the end date for single objects. But how can I filter my queryset so that I only get objects between start and the calculated end date?</p>