sort by event type first, then time

This commit is contained in:
Thomas Steen Rasmussen 2016-08-09 18:38:32 +02:00
parent a83a3d5ee6
commit ef48093f20

View file

@ -65,7 +65,7 @@ class ProgramDayView(TemplateView):
date = datetime.date(year=year, month=month, day=day) date = datetime.date(year=year, month=month, day=day)
day = Day.objects.filter(date=date) day = Day.objects.filter(date=date)
context['date'] = date context['date'] = date
context['events'] = models.Event.objects.filter(days=day).order_by('start', 'event_type') context['events'] = models.Event.objects.filter(days=day).order_by('event_type', 'start')
context['event_types'] = models.EventType.objects.all() context['event_types'] = models.EventType.objects.all()
context['days'] = Day.objects.filter(date__year=year) context['days'] = Day.objects.filter(date__year=year)
return context return context