title: Django query to list
body: <p>I have a database which has records with several fields containing some info.</p>
  
  <p>To get all the data in the table matching some filter I'd do this:</p>
  
  <pre><code>records = Record.objects.filter(fieldA='a')
  </code></pre>
  
  <p>records, I suppose, is a QuerySet object and contains a "list" of records.  Is that correct?</p>
  
  <p>Now let's say I want a list of the values in one field.</p>
  
  <p>If I do this:</p>
  
  <pre><code>records = Record.objects.filter(fieldA='a').only('fieldB')
  </code></pre>
  
  <p>I still get a queryset, but now it has some deferred fields.  What I want is just a list of the values I meant to grab aka fieldB. I also want to be able to grab the distinct values of fieldB.  I suppose I could just iterate over each record, pull out fieldB, add it to a list if it's not already there, and there it is, but there's gotta be a better way.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I think what I'm looking for is </p>
  
  <pre><code>Record.objects.values_list('fieldB')
  </code></pre>