add pdocasts
This commit is contained in:
parent
712ab223ba
commit
d2ed8df2ac
|
@ -60,7 +60,7 @@
|
|||
</a-carousel>
|
||||
|
||||
<nav class="nav-urls">
|
||||
<a href="{% url "episode-list" %}?podcast=true"
|
||||
<a href="{% url "podcast-list" %}"
|
||||
aria-label="{% translate "Show all podcasts" %}">
|
||||
{% translate "All podcasts" %}
|
||||
</a>
|
||||
|
|
|
@ -56,6 +56,7 @@ urls = [
|
|||
views.EpisodeDetailView.as_view(),
|
||||
name="episode-detail",
|
||||
),
|
||||
path(_("podcasts/"), views.PodcastListView.as_view(), name="podcast-list"),
|
||||
path(_("week/"), views.DiffusionListView.as_view(), name="diffusion-list"),
|
||||
path(
|
||||
_("week/<date:date>/"),
|
||||
|
|
|
@ -2,7 +2,7 @@ from . import admin, errors
|
|||
from .article import ArticleDetailView, ArticleListView
|
||||
from .base import BaseAPIView, BaseView
|
||||
from .diffusion import DiffusionListView
|
||||
from .episode import EpisodeDetailView, EpisodeListView
|
||||
from .episode import EpisodeDetailView, EpisodeListView, PodcastListView
|
||||
from .home import HomeView
|
||||
from .log import LogListAPIView, LogListView
|
||||
from .page import (
|
||||
|
@ -28,6 +28,7 @@ __all__ = (
|
|||
"DiffusionListView",
|
||||
"EpisodeDetailView",
|
||||
"EpisodeListView",
|
||||
"PodcastListView",
|
||||
"HomeView",
|
||||
"LogListAPIView",
|
||||
"LogListView",
|
||||
|
|
|
@ -8,6 +8,7 @@ from .program import ProgramPageDetailView
|
|||
__all__ = (
|
||||
"EpisodeDetailView",
|
||||
"EpisodeListView",
|
||||
"PodcastListView",
|
||||
)
|
||||
|
||||
|
||||
|
@ -35,9 +36,6 @@ class EpisodeListView(PageListView):
|
|||
attach_to_value = StaticPage.ATTACH_TO_EPISODES
|
||||
|
||||
|
||||
class PodcastListView(PageListView):
|
||||
model = Episode
|
||||
filterset_class = EpisodeFilters
|
||||
parent_model = Program
|
||||
class PodcastListView(EpisodeListView):
|
||||
attach_to_value = StaticPage.ATTACH_TO_PODCASTS
|
||||
queryset = Episode.objects.published().with_podcasts().order_by("-pub_date")
|
||||
|
|
Loading…
Reference in New Issue
Block a user