More efficient first element fetching and Dot-Notation.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 16 Mar 2012 16:57:27 +0000 (17:57 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 16 Mar 2012 20:20:14 +0000 (21:20 +0100)
commit1eff10fa0fbb93bf5669bbd09cb6e2ac6ad24813
tree26cd3c2869cd4ffb1b1d37bd4bf751e0c5f08f63
parent1b4d9edaef6d9b5650c4e54f82059f965ef75a31
More efficient first element fetching and Dot-Notation.

_get_tag_name_from_entries:
1) Replace:
     if q.count():
       elem = q[0]
   by:
     for element in q:
       ...
       break

   this doesn't do two db queries but only one.

2) And another dose of Dot-Notation as usual.
mediagoblin/listings/views.py