From f58b354a037d2c46fd8db9320f8ba29c9e014436 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 31 Jan 2010 15:19:12 -0600 Subject: Use select_related() to make a few more places more performant Especially when looking at packages, we always want the arch and repo. Another big hunk of changes deals with the very inefficient signoffs code. Signed-off-by: Dan McGee --- todolists/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'todolists/views.py') diff --git a/todolists/views.py b/todolists/views.py index 00236c62..9b64c25c 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -44,7 +44,7 @@ def view(request, listid): @login_required def list(request): - lists = Todolist.objects.order_by('-date_added') + lists = Todolist.objects.select_related('creator').order_by('-date_added') for l in lists: l.complete = TodolistPkg.objects.filter( list=l.id,complete=False).count() == 0 -- cgit v1.2.3-54-g00ecf