summaryrefslogtreecommitdiff
path: root/todolists
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:18:51 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:18:51 -0500
commit6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (patch)
tree8c68a1c118209a7d18c60d9c3c6960a6ae051bcf /todolists
parent03558d8b474d91be6cf21310916672ed62e920b7 (diff)
parent5d9f87c02bd8ad73fdb27600e0afe71284e3082f (diff)
Merge tag 'release_2012-04-07'
I hate writing tag messages. Conflicts: packages/templatetags/package_extras.py templates/packages/flag.html templates/packages/flaghelp.html templates/public/download.html templates/public/index.html templates/public/svn.html
Diffstat (limited to 'todolists')
-rw-r--r--todolists/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/todolists/utils.py b/todolists/utils.py
index 894f3f1d..24101e86 100644
--- a/todolists/utils.py
+++ b/todolists/utils.py
@@ -2,9 +2,13 @@ from django.db.models import Count
from main.models import Todolist
+
def get_annotated_todolists():
qs = Todolist.objects.all()
- lists = qs.select_related('creator').annotate(
+ lists = qs.select_related('creator').defer(
+ 'creator__email', 'creator__password', 'creator__is_staff',
+ 'creator__is_active', 'creator__is_superuser',
+ 'creator__last_login', 'creator__date_joined').annotate(
pkg_count=Count('todolistpkg')).order_by('-date_added')
incomplete = qs.filter(todolistpkg__complete=False).annotate(
Count('todolistpkg')).values_list('id', 'todolistpkg__count')