chore(api): move podcasts in dedicated app (#1899)
This commit is contained in:
parent
4004981429
commit
b9895d19e2
15 changed files with 37 additions and 21 deletions
|
@ -1,10 +1,4 @@
|
|||
from .playlist import PlaylistContentViewSet, PlaylistViewSet
|
||||
from .podcast import (
|
||||
ImportedPodcastViewSet,
|
||||
PodcastEpisodeViewSet,
|
||||
PodcastViewSet,
|
||||
StationPodcastViewSet,
|
||||
)
|
||||
from .schedule import ScheduleViewSet
|
||||
from .show import (
|
||||
ShowDaysViewSet,
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
from rest_framework import viewsets
|
||||
|
||||
from ..models import ImportedPodcast, Podcast, PodcastEpisode, StationPodcast
|
||||
from ..serializers import (
|
||||
ImportedPodcastSerializer,
|
||||
PodcastEpisodeSerializer,
|
||||
PodcastSerializer,
|
||||
StationPodcastSerializer,
|
||||
)
|
||||
|
||||
|
||||
class PodcastViewSet(viewsets.ModelViewSet):
|
||||
queryset = Podcast.objects.all()
|
||||
serializer_class = PodcastSerializer
|
||||
model_permission_name = "podcast"
|
||||
|
||||
|
||||
class PodcastEpisodeViewSet(viewsets.ModelViewSet):
|
||||
queryset = PodcastEpisode.objects.all()
|
||||
serializer_class = PodcastEpisodeSerializer
|
||||
model_permission_name = "podcastepisode"
|
||||
|
||||
|
||||
class StationPodcastViewSet(viewsets.ModelViewSet):
|
||||
queryset = StationPodcast.objects.all()
|
||||
serializer_class = StationPodcastSerializer
|
||||
model_permission_name = "station"
|
||||
|
||||
|
||||
class ImportedPodcastViewSet(viewsets.ModelViewSet):
|
||||
queryset = ImportedPodcast.objects.all()
|
||||
serializer_class = ImportedPodcastSerializer
|
||||
model_permission_name = "importedpodcast"
|
Loading…
Add table
Add a link
Reference in a new issue