summaryrefslogtreecommitdiff
path: root/app/podcasts
diff options
context:
space:
mode:
Diffstat (limited to 'app/podcasts')
-rw-r--r--app/podcasts/models.py1
-rw-r--r--app/podcasts/urls.py5
-rw-r--r--app/podcasts/views.py15
3 files changed, 19 insertions, 2 deletions
diff --git a/app/podcasts/models.py b/app/podcasts/models.py
index b574986..9e458b3 100644
--- a/app/podcasts/models.py
+++ b/app/podcasts/models.py
@@ -11,7 +11,6 @@ try:
except:
License = None
-from taggit.managers import TaggableManager
from mutagen.mp3 import MP3
from media.models import LuxAudio, LuxImage
diff --git a/app/podcasts/urls.py b/app/podcasts/urls.py
index 622b203..f4e39ea 100644
--- a/app/podcasts/urls.py
+++ b/app/podcasts/urls.py
@@ -16,4 +16,9 @@ urlpatterns = [
{'page':1},
name="list"
),
+ path(
+ r'<str:slug>/episode/<int:page>',
+ views.PodcastDetailView.as_view(),
+ name="detail"
+ ),
]
diff --git a/app/podcasts/views.py b/app/podcasts/views.py
index a8edbfa..38d761e 100644
--- a/app/podcasts/views.py
+++ b/app/podcasts/views.py
@@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404
from django.conf import settings
from django.db.models import Q
-from utils.views import PaginatedListView
+from utils.views import PaginatedListView, LuxDetailView
from .models import Episode, Podcast
@@ -27,3 +27,16 @@ class PodcastListView(PaginatedListView):
context['podcast'] = Podcast.objects.get(title="The Lulu & Birdie Podcast")
return context
+class PodcastDetailView(LuxDetailView):
+ """
+ Return a single episodes
+ """
+ model = Podcast
+ template_name = "podcasts/detail.html"
+
+ 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")
+ return context
+