From 11f0db759bb04d0dce303de91c6df441cdf0bfee Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 4 Oct 2010 17:37:39 -0500 Subject: Add some select_related() magic Made obvious when poking around with the Django debug toolbar. Signed-off-by: Dan McGee --- public/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public') diff --git a/public/views.py b/public/views.py index 4306774e..6fbb6896 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 ) -- cgit v1.2.3-55-g3dc8