Files
vrobbler/vrobbler/apps/podcasts/views.py
Colin Powell 5934dcdf8e
All checks were successful
build & deploy / test (push) Successful in 1m53s
build & deploy / deploy (push) Successful in 1m12s
[format] Blacken everything
2026-03-11 23:54:24 -04:00

21 lines
544 B
Python

from django.views import generic
from podcasts.models import Podcast
from scrobbles.views import ScrobbleableListView, ScrobbleableDetailView
class PodcastListView(generic.ListView):
model = Podcast
paginate_by = 20
class PodcastDetailView(generic.DetailView):
model = Podcast
slug_field = "uuid"
def get_context_data(self, **kwargs):
user = self.request.user
context_data = super().get_context_data(**kwargs)
context_data["scrobbles"] = self.object.scrobbles(user)
return context_data