Commit 64ab131e authored by fred's avatar fred
Browse files

performance: prefetch categories for homepage (37->19)

parent ea41fa6b
......@@ -406,7 +406,7 @@ class Home(TemplateView):
'datetime': datetime(2007, 1, day+1)})
context['days'] = days
context['episodes'] = Episode.objects.filter(
context['episodes'] = Episode.objects.prefetch_related('emission__categories').filter(
soundfile__podcastable=True, soundfile__fragment=False) \
.select_related().extra(select={
'first_diffusion': 'emissions_diffusion.datetime', },
......
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