Commit b291c6c0 authored by fred's avatar fred

episodes: order diffusion dates

parent fd7fe5f8
...@@ -109,7 +109,8 @@ class EpisodeDetailView(DetailView, EmissionMixin): ...@@ -109,7 +109,8 @@ class EpisodeDetailView(DetailView, EmissionMixin):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(EpisodeDetailView, self).get_context_data(**kwargs) context = super(EpisodeDetailView, self).get_context_data(**kwargs)
context['sectionName'] = "Emissions" context['sectionName'] = "Emissions"
context['diffusions'] = Diffusion.objects.select_related().filter(episode=self.object.id) context['diffusions'] = Diffusion.objects.select_related().filter(
episode=self.object.id).order_by('datetime')
context['emission'] = Emission.objects.get(slug=self.kwargs.get('emission_slug')) context['emission'] = Emission.objects.get(slug=self.kwargs.get('emission_slug'))
context.update(self.get_emission_context(context['emission'])) context.update(self.get_emission_context(context['emission']))
return context return context
......
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