summaryrefslogtreecommitdiff
path: root/app/podcasts/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2022-12-02 14:16:08 -0600
committerluxagraf <sng@luxagraf.net>2022-12-02 14:16:08 -0600
commit656505098a80e653319236ac302fd6dd9f485b33 (patch)
tree03fe2f552496e2a2b459f5227dc11273d1b94211 /app/podcasts/views.py
parentbf2fa131cba6430ba93f584f4693c3444e0c455f (diff)
reset migrations to zero out some changes (deleting the geodata for
example)
Diffstat (limited to 'app/podcasts/views.py')
-rw-r--r--app/podcasts/views.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/podcasts/views.py b/app/podcasts/views.py
new file mode 100644
index 0000000..a8edbfa
--- /dev/null
+++ b/app/podcasts/views.py
@@ -0,0 +1,29 @@
+from django.views.generic import ListView
+from django.views.generic.detail import DetailView
+from django.views.generic.dates import DateDetailView
+from django.urls import reverse
+from django.contrib.syndication.views import Feed
+from django.apps import apps
+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 .models import Episode, Podcast
+
+
+class PodcastListView(PaginatedListView):
+ """
+ Return a list of Episodes in reverse chronological order
+ """
+ model = Podcast
+ template_name = "podcasts/list.html"
+ queryset = Episode.objects.filter(podcast=1).filter(status__exact=1).order_by('-pub_date')
+
+ 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
+