title: usage of values and annotate in django
body: <p>I am trying to understand how values() and annotate() works.</p>
  
  <p>In my app, I have a model</p>
  
  <pre><code>class MyEntry(models.Model):
      entrydate = models.DateField(default=date.today)
  ...
  </code></pre>
  
  <p>If I do the following in python shell</p>
  
  <pre><code>&gt;&gt;allentries = MyEntry.objects.all()
  &gt;&gt;vals = allentries.values('entrydate')
  &gt;&gt;vals[:2]
  [{ 'entrydate':datetime.date(2013,2,24)},
   { 'entrydate':datetime.date(2013,2,8)}]
  </code></pre>
  
  <p>then,if I apply annotation</p>
  
  <pre><code>&gt;&gt;valsannot = vals.annotate(dailycount=Count('entrydate'))
  &gt;&gt;valsannot[:2]
  [{ 'entrydate':datetime.date(2013,2,24),'dailycount':1},
   { 'entrydate':datetime.date(2013,2,8)},'dailycount':2]
  </code></pre>
  
  <p>When I try this in reverse order</p>
  
  <pre><code>&gt;&gt;allentries = MyEntry.objects.all()
  &gt;&gt; annot = allentries.annotate(dailycount=Count('entrydate'))
  &gt;&gt;annot[:2]
  [ &lt;MyEntry ..2013-2-21&gt;,
    &lt;MyEntry ..2013-2-14&gt; ]
  &gt;&gt;annot[0].dailycount 
   1 #even tho there are many entries on that date
  &gt;&gt;annot[1].dailycount
   1 #even tho there are many entries on that date
  </code></pre>
  
  <p>and then apply values()</p>
  
  <pre><code>&gt;&gt;annotvals = annot.values('entrydate')
  &gt;&gt;annotvals[:2]
  [{'today': datetime.date(2013, 2, 21)}, 
   {'today': datetime.date(2013, 2, 14)}]
  </code></pre>
  
  <p>I am not sure I follow these clearly..Can somebody explain why the reverse doesn't work as the first?</p>