title: How to sum this query set element in Django template?
body: <p>I have a function to view report:</p>
  
  <pre><code>def view_report(request):
      a = Bill.objects.all()
      return render_to_response('report.html', {'a':a}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>There's a attribute called price which has numeric elements. I want to sum all the prices and show as one number in Django template:</p>
  
  <pre><code>{% for i in a %}
  
  {{ i.price }}
  
  {% endfor %}
  </code></pre>
  
  <p>This simply returns all the prices. I want to sum all those prices and show as one. I tried using <code>{{  i.price|sum }}</code> which didn't work.</p>