title: Django annotate to return other fields as well
body: <p>I have a model:</p>
  
  <pre><code>class ModelTest(models.Model):
      test_name = models.CharField(max_length=100)
      test_field = models.IntegerField()
      test_date = models.DateTimeField()
      test_make = models.IntegerField()
  </code></pre>
  
  <p>Now, I want rows which have <strong>max test_date</strong> for the <strong>same test_field</strong>.</p>
  
  <p>What I did was <code>ModelTest.objects.values('test_field').annotate(td=Max('test_date')).values('test_field','test_date')</code>.</p>
  
  <p>Now, I want that I get all the other field values as well for the selected rows. If I try adding them in any of the <code>values</code>, the annotate doesn't work.</p>
  
  <p>What is the possible solution?</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>Test Data:</p>
  
  <pre><code>test_name | test_field | test_date                     | test_make
  
  test1     | 1          | 2012-01-23 15:24:10.389+05:30 | 3
  
  test2     | 2          | 2012-01-23 15:24:26.747+05:30 | 5
  
  test3     | 3          | 2012-01-23 15:27:19.033+05:30 | 1
  
  test4     | 2          | 2012-01-23 15:29:45.098+05:30 | 4
  
  test5     | 3          | 2012-01-23 15:54:01.322+05:30 | 2
  </code></pre>
  
  <p>Now, I want as output is:</p>
  
  <pre><code>test1     | 1          | 2012-01-23 15:24:10.389+05:30 | 3
  
  test4     | 2          | 2012-01-23 15:29:45.098+05:30 | 4
  
  test5     | 3          | 2012-01-23 15:54:01.322+05:30 | 2
  </code></pre>