title: A QuerySet by aggregate field value
body: <p>Let's say I have the following model:</p>
  
  <pre><code>class Contest:
      title = models.CharField( max_length = 200 )
      description = models.TextField()
  
  class Image:
      title = models.CharField( max_length = 200 )
      description = models.TextField()
      contest = models.ForeignKey( Contest )
      user = models.ForeignKey( User )
  
      def score( self ):
          return self.vote_set.all().aggregate( models.Sum( 'value' ) )[ 'value__sum' ]
  
  class Vote:
      value = models.SmallIntegerField()
      user = models.ForeignKey( User )
      image = models.ForeignKey( Image )
  </code></pre>
  
  <p>The users of a site can contribute their images to several contests. Then other users can vote them up or down.</p>
  
  <p>Everything works fine, but now I want to display a page on which users can see all contributions to a certain contest. The images shall be ordered by their score.
  Therefore I have tried the following:</p>
  
  <pre><code>Contest.objects.get( pk = id ).image_set.order_by( 'score' )
  </code></pre>
  
  <p>As I feared it doesn't work since <code>'score'</code> is no database field that could be used in queries.</p>