title: Need to get user lists along Average in django while data in separate table
body: <p>I am trying to get user list along with average login time</p>
  
  <p>Model 1:</p>
  
  <pre><code>class User(models.Model):
      name = models.CharField(max_length=200) 
      age = models.CharField(max_length=200)
      email = models.CharField(max_length=200)
  </code></pre>
  
  <p>Model 2:</p>
  
  <pre><code>class History(models.Model):
      login_time = models.DateTimeField()
      logout_time = models.DateTimeField()
      user = models.ForeignKeyField(User, related_name="user_relation")
  </code></pre>
  
  <p>I need records in list of below format avg_logged_in_time will average of be (logout_time - login-time)</p>
  
  <pre><code>Name, email, avg_logged_in_time
  </code></pre>