title: How do you dynamically assign aliases in a django aggregate?
body: <p>I'm trying out the <a href="https://docs.djangoproject.com/en/1.9/topics/db/aggregation/#generating-aggregates-for-each-item-in-a-queryset" rel="noreferrer">django aggregates</a>. I'm dynamically calling these aggregates and need to assign and alias them on the fly. I want the resulting alias to be the name of the original field.</p>
  
  <p>For example:</p>
  
  <pre><code>from django.db import models as aggregator
  
  field = 'person'
  reducer = getattr(aggregator, 'Sum')
  
  query_set.aggregate(field=reducer(field))
  </code></pre>
  
  <p>I'm expecting this:</p>
  
  <pre><code>{'person':12}
  </code></pre>
  
  <p>But getting this:</p>
  
  <pre><code>{'field':12}
  </code></pre>
  
  <p>Is there a way I can dynamically assign the alias in this case?</p>