title: How can i sum the content of a django model
body: <p>I have this model:</p>
  
  <pre><code>class Transfer(models.Model):
          transfer_code = models.CharField(max_length=30, blank=True, null=True)
          sender_name = models.CharField(max_length=30, blank=True, null=True)
          amount = models.IntegerField(blank=True, null=True)
          recipient_name = models.CharField(max_length=30, blank=True, null=True)
          time_sent = models.DateTimeField(auto_now_add=True, auto_now=False)
          received = models.BooleanField(default=False)
          time_received = models.DateTimeField(auto_now_add=False, auto_now=False, null=True)
  
          def __unicode__(self):
              return self.transfer_code
  </code></pre>
  
  <p>This is my view where i want to calculate the total amount in the table:</p>
  
  <pre><code>def listtransfersall(request):
      title = 'ALL TRANSFERS'
      queryset = Transfer.objects.all()
      for instance in queryset:
          total = 0
          total += instance.amount
          print total
  
      context = {
      "title": title,
      "queryset": queryset,
      "total": total,
      }
      return render(request, "listtransfersall.html",context)
  </code></pre>
  
  <p>This prints the amount in the table individually.
  How can i get the total and assign it to the total variable?</p>