Commit 44513ec4 authored by fred's avatar fred

put reruns after original diffusion schedule

parent 5cbfaa1b
......@@ -81,7 +81,8 @@ class EmissionDetailView(DetailView, EmissionMixin):
def get_context_data(self, **kwargs):
context = super(EmissionDetailView, self).get_context_data(**kwargs)
context['sectionName'] = "Emissions"
context['schedules'] = Schedule.objects.select_related().filter(emission=self.object).order_by('datetime')
context['schedules'] = Schedule.objects.select_related().filter(
emission=self.object).order_by('rerun', 'datetime')
context['news'] = NewsItem.objects.all().filter(emission=self.object.id).order_by('-date')[:3]
context.update(self.get_emission_context(self.object))
return context
......@@ -108,7 +109,8 @@ class EmissionEpisodesDetailView(DetailView, EmissionMixin):
def get_context_data(self, **kwargs):
context = super(EmissionEpisodesDetailView, self).get_context_data(**kwargs)
context['sectionName'] = "Emissions"
context['schedules'] = Schedule.objects.select_related().filter(emission=self.object).order_by('datetime')
context['schedules'] = Schedule.objects.select_related().filter(
emission=self.object).order_by('rerun', 'datetime')
context['search_query'] = self.request.GET.get('q')
if context['search_query']:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment