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