From 85ff158e2db7b8de9094b72eee3e0a45630120c3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 30 Jan 2010 13:50:16 -0600 Subject: Use select_related() for some mirror pages We also traverse relationships here, so select the associated items. Signed-off-by: Dan McGee --- mirrors/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mirrors') diff --git a/mirrors/views.py b/mirrors/views.py index da54774f..45ac5738 100644 --- a/mirrors/views.py +++ b/mirrors/views.py @@ -39,7 +39,7 @@ def choose(request): def generate(request, arch='i686', country=None): # do a quick sanity check on the architecture archobj = get_object_or_404(Arch, name=arch) - qset = MirrorUrl.objects.filter( + qset = MirrorUrl.objects.select_related().filter( Q(protocol__protocol__iexact='HTTP') | Q(protocol__protocol__iexact='FTP'), mirror__public=True, mirror__active=True, mirror__isos=True -- cgit v1.2.3-2-g168b