From ca4106a7c0f797ba06e15f777c94cddd5d82a3dc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 8 Feb 2013 22:17:02 -0600 Subject: Ensure todolists are consistently sorted This is for the public view page; we had no order_by() call so lists could be displayed in seemingly random order. Signed-off-by: Dan McGee --- todolists/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'todolists') diff --git a/todolists/views.py b/todolists/views.py index f333728a..c7a4369a 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -219,7 +219,8 @@ def send_todolist_emails(todo_list, new_packages): def public_list(request): - todo_lists = Todolist.objects.incomplete().defer('raw') + todo_lists = Todolist.objects.incomplete().defer( + 'raw').order_by('-created') # total hackjob, but it makes this a lot less query-intensive. all_pkgs = [tp for tl in todo_lists for tp in tl.packages()] attach_maintainers(all_pkgs) -- cgit v1.2.3-55-g3dc8