title: Django get row count by date
body: <p>I have been mulling over this for a while looking at many stackoverflow questions and going through <a href="https://docs.djangoproject.com/en/1.6/topics/db/aggregation/)%20multiple%20times" rel="nofollow">aggregation docs</a>
  I'm needing to get a dataset of PropertyImpressions grouped by date. Here is the PropertyImpression model:</p>
  
  <pre><code>#models.py
  class PropertyImpression(models.Model):
      '''
      Impression data for Property Items
      '''
      property = models.ForeignKey(Property, db_index=True)
      imp_date = models.DateField(auto_now_add=True)
  </code></pre>
  
  <p>I have tried so many variations of the view code, but I'm posting this code because I consider to be the most logical, simple code, which according to documentation and examples should do what I'm trying to do.</p>
  
  <pre><code>#views.py
  def admin_home(request):
      '''
      this is the home dashboard for admins, which currently just means staff.
      Other users that try to access this page will be redirected to login.
      '''
      prop_imps = PropertyImpression.objects.values('imp_date').annotate(count=Count('id'))
  
      return render(request, 'reportcontent/admin_home.html', {'prop_imps':prop_imps})
  </code></pre>
  
  <p>Then in the template when using the {{ prop_imps }} variable, it gives me a list of the PropertyImpressions, but are grouped by both imp_date and property. I need this to only group by imp_date, and by adding the .values('imp_date') according to <a href="https://docs.djangoproject.com/en/1.6/topics/db/aggregation/#values" rel="nofollow">values docs</a> it would just be grouping by that field?</p>
  
  <p>When leaving off the .annotate in the prop_imps variable, it gives me a list of all the imp_dates, which is really close, but when I group by the date field it for some reason groups by both imp_date and property.</p>