2022-04-04 14:38:50 +02:00
|
|
|
"""
|
|
|
|
URL Configuration
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/3.2/topics/http/urls/
|
|
|
|
"""
|
2020-01-30 14:47:36 +01:00
|
|
|
from django.urls import include, path
|
2021-10-16 20:34:03 +02:00
|
|
|
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
2020-01-30 14:47:36 +01:00
|
|
|
from rest_framework import routers
|
|
|
|
|
2022-04-04 14:38:50 +02:00
|
|
|
from .core.router import router as core_router
|
|
|
|
from .core.views import version
|
|
|
|
from .history.router import router as history_router
|
2022-06-21 14:40:21 +02:00
|
|
|
from .podcasts.router import router as podcasts_router
|
2022-04-04 14:38:50 +02:00
|
|
|
from .schedule.router import router as schedule_router
|
|
|
|
from .storage.router import router as storage_router
|
2020-01-30 14:47:36 +01:00
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
2022-04-04 14:38:50 +02:00
|
|
|
|
|
|
|
router.registry.extend(core_router.registry)
|
|
|
|
router.registry.extend(history_router.registry)
|
2022-06-21 14:40:21 +02:00
|
|
|
router.registry.extend(podcasts_router.registry)
|
2022-04-04 14:38:50 +02:00
|
|
|
router.registry.extend(schedule_router.registry)
|
|
|
|
router.registry.extend(storage_router.registry)
|
|
|
|
|
2020-01-30 14:47:36 +01:00
|
|
|
|
|
|
|
urlpatterns = [
|
2021-05-27 16:23:02 +02:00
|
|
|
path("api/v2/", include(router.urls)),
|
2022-04-04 14:38:50 +02:00
|
|
|
path("api/v2/version/", version),
|
|
|
|
path(
|
|
|
|
"api/v2/schema/",
|
|
|
|
SpectacularAPIView.as_view(),
|
|
|
|
name="schema",
|
|
|
|
),
|
2021-10-16 20:34:03 +02:00
|
|
|
path(
|
|
|
|
"api/v2/schema/swagger-ui/",
|
|
|
|
SpectacularSwaggerView.as_view(url_name="schema"),
|
|
|
|
name="swagger-ui",
|
|
|
|
),
|
2021-05-27 16:23:02 +02:00
|
|
|
path("api-auth/", include("rest_framework.urls", namespace="rest_framework")),
|
2020-01-30 14:47:36 +01:00
|
|
|
]
|