From 3f6c77a151ec1188eec281bd9c64d6d5e88e310d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 6 Nov 2016 17:21:26 +0100 Subject: [PATCH] manage: order announces chronologically (#13877) --- corbo/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corbo/views.py b/corbo/views.py index fbdfa20..530dfac 100644 --- a/corbo/views.py +++ b/corbo/views.py @@ -132,7 +132,8 @@ class CategoryView(DetailView): def get_context_data(self, **kwargs): context = super(CategoryView, self).get_context_data(**kwargs) - context['announces'] = self.object.announce_set.all() + context['announces'] = self.object.announce_set.all().order_by( + '-publication_time', '-ctime') return context -- 2.10.2