]> git.parisson.com Git - teleforma.git/commitdiff
One course only on home
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 28 Jul 2017 23:59:45 +0000 (01:59 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 28 Jul 2017 23:59:45 +0000 (01:59 +0200)
teleforma/views/core.py

index 123c109a5c8dacb72d2c3bb45bd83f159a485950..ef726a87464bfb96ba6c42083302bc4e117240fa 100644 (file)
@@ -295,7 +295,7 @@ class CourseListView(CourseAccessMixin, ListView):
         context['room'] = get_room(name='site', period=context['period'].name)
         context['doc_types'] = DocumentType.objects.all()
         context['list_view'] = True
-        context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)[:3]
+        context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)[:1]
         return context
 
     @method_decorator(login_required)