Mercurial > public > sg101
diff gpp/weblinks/models.py @ 191:046e6ef0ff45
Added select_related() to weblinks.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 01 Apr 2010 02:01:33 +0000 |
parents | 5c889b587416 |
children | fa7d82bfb100 |
line wrap: on
line diff
--- a/gpp/weblinks/models.py Thu Apr 01 01:57:01 2010 +0000 +++ b/gpp/weblinks/models.py Thu Apr 01 02:01:33 2010 +0000 @@ -25,7 +25,8 @@ class PublicLinkManager(models.Manager): """The manager for all public links.""" def get_query_set(self): - return super(PublicLinkManager, self).get_query_set().filter(is_public=True) + return super(PublicLinkManager, self).get_query_set().filter( + is_public=True).select_related() class Link(models.Model):