]> git.parisson.com Git - mezzo.git/commitdiff
Media: current type
authorEmilie <zawadzki@ircam.fr>
Fri, 21 Oct 2016 09:56:21 +0000 (11:56 +0200)
committerEmilie <zawadzki@ircam.fr>
Fri, 21 Oct 2016 09:56:21 +0000 (11:56 +0200)
app/organization/media/views.py

index 170da8c9d7b968649d5beb69b73e5b75df4e838b..599cf9ce1d5573d1550439c5c0f3dda89fc3fd76 100644 (file)
@@ -24,11 +24,14 @@ class PlaylistListView(ListView):
     context_object_name = 'playlists'
     def get_queryset(self):
         qs = Playlist.objects.all()
+        self.current_type = None
         if "type" in self.kwargs:
             qs = qs.filter(type=self.kwargs['type'])
+            self.current_type = self.kwargs['type']
         return qs
     def get_context_data(self, **kwargs):
         context = super(PlaylistListView, self).get_context_data(**kwargs)
+        context['current_type'] = self.current_type
         return context