title: Django order by related field
body: <p>I want to sort a QuerySet of contacts by a related field. But I do not know how.
  I tried it like this, but it does not work.</p>
  
  <pre><code>foundContacts.order_by("classification.kam")
  </code></pre>
  
  <p>Actually in a template I can access the kam value of a contact through contact.classification.kam since it is a OneToOne relationship.</p>
  
  <p>The (simplified) models look like this:</p>
  
  <pre><code>class Classification(models.Model):
      kam = models.ForeignKey(User)
      contact = models.OneToOneField(Contact)
  
  class Contact(models.Model):
      title = models.ForeignKey(Title, blank=True, null=True)
      first_name = models.CharField(max_length=200)
      last_name = models.CharField(max_length=200)
  </code></pre>