title: Django 'dict' object has no attribute
body: <p>I am making queries to get the total number of apples by month. Now I want retrieve and print the data of <code>total_apple</code>.</p>
  
  <pre><code>fruits= Fruits.objects\
          .annotate(month = TruncMonth('sold_date'))\
          .values('month')\
          .annotate(total_apple=Sum('apple'))\
          .order_by('-month')
  </code></pre>
  
  <p>I've tried many ways to print it but returned an error.</p>
  
  <p>I've tried: </p>
  
  <p>1)</p>
  
  <pre><code>total_apple= fruits['total_apple']
  print(total_apple)
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>context['total_apple'] = total_apple
  print(context)
  </code></pre>
  
  <p>An error returned: 
  <code>No exception message supplied</code></p>
  
  <p>3) </p>
  
  <pre><code>print(fruits.total_apple)
  </code></pre>
  
  <p>Error returned: 
  <code>'QuerySet' object has no attribute 'total_apple'</code></p>
  
  <p>But when I tried <code>print(fruits)</code>, it returned queryset that contain the attributes that I want. </p>
  
  <pre><code>&lt;QuerySet [{'month': datetime.date(2018, 10, 1), 'total_apple': 1636}, {'month': datetime.date(2018, 9, 1), 'total_apple': 1658},.....&gt;
  </code></pre>