mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 15:51:08 -05:00
55 lines
1.9 KiB
Python
55 lines
1.9 KiB
Python
"""Comprehensive URL routes for Parks domain (API v1).
|
|
|
|
This file exposes a maximal set of "full-fat" endpoints implemented in
|
|
`apps.api.v1.parks.park_views` and `apps.api.v1.parks.views`. Endpoints are
|
|
intentionally expansive to match the rides API functionality and provide
|
|
complete feature parity for parks management.
|
|
"""
|
|
|
|
from django.urls import path, include
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .park_views import (
|
|
ParkListCreateAPIView,
|
|
ParkDetailAPIView,
|
|
FilterOptionsAPIView,
|
|
ParkSearchSuggestionsAPIView,
|
|
)
|
|
from .company_views import (
|
|
ParkCompanyListCreateAPIView,
|
|
ParkCompanyDetailAPIView,
|
|
ParkCompanySearchAPIView,
|
|
)
|
|
from .views import ParkPhotoViewSet
|
|
|
|
# Create router for nested photo endpoints
|
|
router = DefaultRouter()
|
|
router.register(r"photos", ParkPhotoViewSet, basename="park-photo")
|
|
|
|
app_name = "api_v1_parks"
|
|
|
|
urlpatterns = [
|
|
# Core list/create endpoints
|
|
path("", ParkListCreateAPIView.as_view(), name="park-list-create"),
|
|
# Filter options
|
|
path("filter-options/", FilterOptionsAPIView.as_view(), name="park-filter-options"),
|
|
# Company endpoints - domain-specific CRUD for OPERATOR/PROPERTY_OWNER companies
|
|
path("companies/", ParkCompanyListCreateAPIView.as_view(), name="park-companies-list-create"),
|
|
path("companies/<int:pk>/", ParkCompanyDetailAPIView.as_view(), name="park-company-detail"),
|
|
# Autocomplete / suggestion endpoints
|
|
path(
|
|
"search/companies/",
|
|
ParkCompanySearchAPIView.as_view(),
|
|
name="park-search-companies",
|
|
),
|
|
path(
|
|
"search-suggestions/",
|
|
ParkSearchSuggestionsAPIView.as_view(),
|
|
name="park-search-suggestions",
|
|
),
|
|
# Detail and action endpoints
|
|
path("<int:pk>/", ParkDetailAPIView.as_view(), name="park-detail"),
|
|
# Park photo endpoints - domain-specific photo management
|
|
path("<int:park_pk>/photos/", include(router.urls)),
|
|
]
|