title: django annotation and filtering
body: <p>Hopefully this result set is explanatory enough:</p>
  
  <pre><code>title             text            total_score    already_voted
  -------------     ------------    -----------    -------------
  BP Oil spi...     Recently i...   5              0
  J-Lo back ...     Celebrity ...   7              1
  Don't Stop...     If there w...   9              0
  Australian...     The electi...   2              1
  </code></pre>
  
  <p>My models file describes article (author, text, title) and vote (caster, date, score). I can get the first three columns just fine with the following:</p>
  
  <pre><code>articles = Article.objects.all().annotate(total_score=Sum('vote__score'))
  </code></pre>
  
  <p>but calculating the 4th column, which is a boolean value describing whether the current logged in user has placed any of the votes in column 3, is a bit beyond me at the moment! Hopefully there's something that doesn't require raw sql for this one.</p>
  
  <p>Cheers,
  Dave</p>
  
  <p>--Trindaz on Fedang #django</p>