summaryrefslogtreecommitdiff
path: root/todolists/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-08 22:17:02 -0600
committerDan McGee <dan@archlinux.org>2013-02-08 22:17:02 -0600
commitca4106a7c0f797ba06e15f777c94cddd5d82a3dc (patch)
tree33fcb55185aab3fef00ca79b5a0b1dc9a1766aa9 /todolists/views.py
parent82947873d65d06d4d938402b57e9244629f97228 (diff)
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 <dan@archlinux.org>
Diffstat (limited to 'todolists/views.py')
-rw-r--r--todolists/views.py3
1 files changed, 2 insertions, 1 deletions
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)