summaryrefslogtreecommitdiff
path: root/app/podcasts/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/podcasts/views.py')
-rw-r--r--app/podcasts/views.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/app/podcasts/views.py b/app/podcasts/views.py
index 38d761e..9f955b5 100644
--- a/app/podcasts/views.py
+++ b/app/podcasts/views.py
@@ -24,9 +24,10 @@ class PodcastListView(PaginatedListView):
def get_context_data(self, **kwargs):
context = super(PodcastListView, self).get_context_data(**kwargs)
context['breadcrumbs'] = ['podcast',]
- context['podcast'] = Podcast.objects.get(title="The Lulu & Birdie Podcast")
+ context['podcast'] = Podcast.objects.get(slug=self.kwargs['slug'])
return context
+
class PodcastDetailView(LuxDetailView):
"""
Return a single episodes
@@ -37,6 +38,19 @@ class PodcastDetailView(LuxDetailView):
def get_context_data(self, **kwargs):
context = super(PodcastListView, self).get_context_data(**kwargs)
context['breadcrumbs'] = ['podcast',]
- context['podcast'] = Podcast.objects.get(title="The Lulu & Birdie Podcast")
+ context['podcast'] = Podcast.objects.get(slug=self.kwargs['slug'])
return context
+
+class EpisodeListView(PaginatedListView):
+ """
+ Return a list of Episodes in reverse chronological order
+ """
+ model = Episode
+ template_name = "podcasts/list-episode.html"
+
+ def get_context_data(self, **kwargs):
+ context = super(EpisodeListView, self).get_context_data(**kwargs)
+ context['breadcrumbs'] = ['podcast',]
+ context['podcast'] = Podcast.objects.get(slug=self.kwargs['slug'])
+ return context