title: Django: Ordering objects by their children's attributes
body: <p>Consider the models:</p>
  
  <pre><code>class Author(models.Model):
      name = models.CharField(max_length=200, unique=True)
  
  class Book(models.Model):
      pub_date = models.DateTimeField()
      author = models.ForeignKey(Author)
  </code></pre>
  
  <p>Now suppose I want to order all the books by, say, their pub_date. I would use <code>order_by('pub_date')</code>. But what if I want a list of all authors ordered according to who most recently published books?</p>
  
  <p>It's really very simple when you think about it. It's essentially:</p>
  
  <ul>
  <li>The author on top is the one who most recently published a book</li>
  <li>The next one is the one who published books not as new as the first,</li>
  <li>So on etc.</li>
  </ul>
  
  <p>I could probably hack something together, but since this could grow big, I need to know that I'm doing it right.</p>
  
  <p>Help appreciated!</p>
  
  <p><strong>Edit:</strong> Lastly, would the option of just adding a new field to each one to show the date of the last book and just updating that the whole time be better?</p>