summaryrefslogtreecommitdiffstats
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-30 20:50:16 +0100
committerDan McGee <dan@archlinux.org>2010-01-30 20:53:11 +0100
commit85ff158e2db7b8de9094b72eee3e0a45630120c3 (patch)
tree4eeff6ae32b63b5b8a8d17754740e83f275b1109 /mirrors
parentf1047dd4b330d5f9011076f346422f2b322ada9f (diff)
downloadarchweb-85ff158e2db7b8de9094b72eee3e0a45630120c3.tar.gz
archweb-85ff158e2db7b8de9094b72eee3e0a45630120c3.tar.xz
Use select_related() for some mirror pages
We also traverse relationships here, so select the associated items. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index da54774..45ac573 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