title: Django calculate Avg for a computed field
body: <p>I have a model as below.</p>
  
  <pre><code>class Transaction(models.Model):
  
      time1 = models.DateTimeField(null=True)
      time2 = models.DateTimeField(null=True)
  
      @property
      def time_diff(self):
          return time2.total_seconds() - time1.total_seconds()
  </code></pre>
  
  <p>I need to get the average of the (time2 - time1) in seconds for a list of records, if both values are not null.</p>
  
  <pre><code>time_avg = transactions.aggregate(total=Avg('time_diff',field='time_diff'))
  </code></pre>
  
  <p>This gives an error saying 'time_diff' is not a valid field. I want to keep this column as a derived property. Not a stored column.</p>