From cbe9bec436c7f4aa9c707fe33dc8c4c92a835fab Mon Sep 17 00:00:00 2001 From: Emilie Date: Fri, 21 Oct 2016 11:56:21 +0200 Subject: [PATCH] Media: current type --- app/organization/media/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/organization/media/views.py b/app/organization/media/views.py index 170da8c9..599cf9ce 100644 --- a/app/organization/media/views.py +++ b/app/organization/media/views.py @@ -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 -- 2.39.5