summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-05 00:37:39 +0200
committerDan McGee <dan@archlinux.org>2010-10-05 00:37:39 +0200
commit11f0db759bb04d0dce303de91c6df441cdf0bfee (patch)
treeb7f76309cba6ef20587040672be5ed6684d6bdc4 /public
parent0e58a2e49f59fe41a27afa7bf8f9b3c77405c6d1 (diff)
downloadarchweb-11f0db759bb04d0dce303de91c6df441cdf0bfee.tar.gz
archweb-11f0db759bb04d0dce303de91c6df441cdf0bfee.tar.xz
Add some select_related() magic
Made obvious when poking around with the Django debug toolbar. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public')
-rw-r--r--public/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/views.py b/public/views.py
index 4306774..6fbb689 100644
--- a/public/views.py
+++ b/public/views.py
@@ -43,7 +43,7 @@ def donate(request):
return direct_to_template(request, 'public/donate.html', context)
def download(request):
- qset = MirrorUrl.objects.filter(
+ qset = MirrorUrl.objects.select_related('mirror', 'protocol').filter(
Q(protocol__protocol__iexact='HTTP') | Q(protocol__protocol__iexact='FTP'),
mirror__public=True, mirror__active=True, mirror__isos=True
)