Commits

Luke Plant committed 06dd9ae

Fixed ordering of sermons to be strictly reverse chronological

Previously it was date DESC, time ASC, which made sense when the template
grouped by the day, but now we only group by month.

  • Participants
  • Parent commits 1f595e0

Comments (0)

Files changed (1)

 
 
 def index(request):
-    sermons = Sermon.objects.filter(published=True).select_related('series', 'speaker')
+    sermons = Sermon.objects.filter(published=True).select_related('series', 'speaker').order_by('-date_delivered', '-time_delivered')
     sermonsfilter = SermonFilterSet(sermons, request.GET)
     return render(request, "sermons/index.html", {'sermons': sermonsfilter.qs,
                                                   'sermonsfilter': sermonsfilter})