comparison 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
comparison
equal deleted inserted replaced
190:0e4961833cdf 191:046e6ef0ff45
23 23
24 24
25 class PublicLinkManager(models.Manager): 25 class PublicLinkManager(models.Manager):
26 """The manager for all public links.""" 26 """The manager for all public links."""
27 def get_query_set(self): 27 def get_query_set(self):
28 return super(PublicLinkManager, self).get_query_set().filter(is_public=True) 28 return super(PublicLinkManager, self).get_query_set().filter(
29 is_public=True).select_related()
29 30
30 31
31 class Link(models.Model): 32 class Link(models.Model):
32 '''Model to represent a web link''' 33 '''Model to represent a web link'''
33 category = models.ForeignKey(Category) 34 category = models.ForeignKey(Category)