title: Django order_by() filter with distinct()
body: <p>How can I make an <code>order_by</code> like this ....</p>
  
  <pre><code>p = Product.objects.filter(vendornumber='403516006')\
                     .order_by('-created').distinct('vendor__name')
  </code></pre>
  
  <p>The problem is that I have multiple vendors with the same name, and I only want the latest product by the vendor ..</p>
  
  <p>Hope it makes sense?</p>
  
  <p>I got this DB error:</p>
  
  <blockquote>
    <p>SELECT DISTINCT ON expressions must match initial ORDER BY expressions
    LINE 1: SELECT DISTINCT ON ("search_vendor"."name")
    "search_product"...</p>
  </blockquote>