title: Retrieving distinct records based on a column on Django
body: <p>I need to retrieve a list of records for the following table with distinct values in regards to name:</p>
  
  <pre><code>Class C:
  
  name                value
  A ------------------ 10
  A ------------------ 20
  A ------------------ 20
  B ------------------ 50
  C ------------------ 20
  D ------------------ 10
  B ------------------ 10
  A ------------------ 30
  </code></pre>
  
  <p>I need to get rid of all the duplicate values for name and only show the following:</p>
  
  <pre><code>name                value
  A ------------------ 30
  B ------------------ 10
  C ------------------ 20
  D ------------------ 10
  </code></pre>
  
  <p>As you can see, it almost looks like a python set. I can probably generate the set using Python, but I'm wondering if Django's ORM has this feature. </p>
  
  <p>I tried using distinct, but it doesn't accept any argument to specify which column has to have distinct values. Any idea how to get this query working?</p>