diff gpp/weblinks/views.py @ 191:046e6ef0ff45

Added select_related() to weblinks.
author Brian Neal <bgneal@gmail.com>
date Thu, 01 Apr 2010 02:01:33 +0000
parents 952e05cb3d80
children b4305e18d3af
line wrap: on
line diff
--- a/gpp/weblinks/views.py	Thu Apr 01 01:57:01 2010 +0000
+++ b/gpp/weblinks/views.py	Thu Apr 01 02:01:33 2010 +0000
@@ -193,7 +193,7 @@
 
    links = Link.public_objects.filter(
          Q(title__icontains = query_text) |
-         Q(description__icontains = query_text)).order_by('title')
+         Q(description__icontains = query_text)).order_by('title').select_related()
    paginator = create_paginator(links)
    try:
       the_page = paginator.page(int(page))