jo 0e3ede5a1a chore(api): route using urls
Allow to register function views in the same app instead of globaly.
2022-07-19 19:52:54 +02:00

17 lines
438 B
Python

from rest_framework import routers
from .views import (
ImportedPodcastViewSet,
PodcastEpisodeViewSet,
PodcastViewSet,
StationPodcastViewSet,
)
router = routers.DefaultRouter()
router.register("podcast-episodes", PodcastEpisodeViewSet)
router.register("podcasts", PodcastViewSet)
router.register("station-podcasts", StationPodcastViewSet)
router.register("imported-podcasts", ImportedPodcastViewSet)
urls = router.urls