feat(api): split api into multiple apps (#1626)
Fixes #1622 - split the api into 4 apps: core, history, schedule, storage - exploded the settings into testing/prod
This commit is contained in:
parent
87d2da9d84
commit
fce988aef1
120 changed files with 1499 additions and 1078 deletions
33
api/libretime_api/schedule/views/podcast.py
Normal file
33
api/libretime_api/schedule/views/podcast.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
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