From 39a603bf65c4aec780e4711074e9ed27fb7c301e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2012 12:26:50 -0600 Subject: Defer the 'raw' field when listing todolists A lot like skipping fetching of the news content; we definitely don't need this just to list the todolists on index pages. Signed-off-by: Dan McGee --- todolists/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'todolists/utils.py') diff --git a/todolists/utils.py b/todolists/utils.py index d084c645..0daca3b6 100644 --- a/todolists/utils.py +++ b/todolists/utils.py @@ -19,7 +19,7 @@ SELECT todolist_id, count(*), sum(CASE WHEN status = %s THEN 1 ELSE 0 END) def get_annotated_todolists(incomplete_only=False): - lists = Todolist.objects.all().select_related( + lists = Todolist.objects.all().defer('raw').select_related( 'creator').order_by('-created') lookup = todo_counts() -- cgit v1.2.3-55-g3dc8