order newsitems
authorFrédéric Péters <fpeters@0d.be>
Sun, 31 May 2015 11:52:11 +0000 (13:52 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 31 May 2015 11:52:11 +0000 (13:52 +0200)
panikombo/models.py

index 57848f5..617212a 100644 (file)
@@ -140,6 +140,7 @@ class NewsItemAutoSelectionCell(CellBase):
             newsitems_queryset = newsitems_queryset.filter(event_date__gte=date.today())
         if self.category:
             newsitems_queryset = newsitems_queryset.filter(category=self.category)
+        newsitems_queryset = newsitems_queryset.order_by('-event_date', '-creation_timestamp')
         return newsitems_queryset
 
     def render(self, context):