title: Django QuerySet for latest and distinct
body: <p>I have the following model:</p>
  
  <pre><code>class CarPrice(models.Model):
      car = models.ForeignKey(Car)
      price = models.ForeignKey(Price)
      start_date = models.DateTimeField(default=datetime.datetime.now())
  </code></pre>
  
  <p>There can be multiple CarPrices for the same Car with different start_dates for the set price.</p>
  
  <p>I need something that looks like:</p>
  
  <pre><code>car_prices = CarPrice.objects.filter(car__in=cars).get_latest()
  </code></pre>
  
  <p>How can I construct a query that returns a QuerySet with all the latest CarPrices (start_date &lt; now) for each Car in cars (needs to be distinct for each car).</p>