title: Getting Unique Foreign Keys in Django?
body: <p>Suppose my model looks like this:</p>
  
  <pre><code>class Farm(models.Model):
     name = ...
  
  class Tree(models.Model):
     farm = models.ForeignKey(Farm)
  </code></pre>
  
  <p>...and I get a <code>QuerySet</code> of <code>Tree</code> objects. How do I determine what farms are represented in that <code>QuerySet</code>?</p>