diff options
author | Dan McGee <dan@archlinux.org> | 2010-01-31 15:19:12 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-01-31 15:19:12 -0600 |
commit | f58b354a037d2c46fd8db9320f8ba29c9e014436 (patch) | |
tree | 05aaea7bcd1a055af9d873482a40b7ecdc44a082 /todolists/views.py | |
parent | e0eed01914752ee98d50aeab748f71b24df94dc6 (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'todolists/views.py')
-rw-r--r-- | todolists/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |