mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 02:31:08 -05:00
80 lines
2.5 KiB
Python
80 lines
2.5 KiB
Python
"""
|
|
URL routes for RideModel domain (API v1).
|
|
|
|
This file exposes comprehensive endpoints for ride model management:
|
|
- Core CRUD operations for ride models
|
|
- Search and filtering capabilities
|
|
- Statistics and analytics
|
|
- Nested resources (variants, technical specs, photos)
|
|
"""
|
|
|
|
from django.urls import path
|
|
|
|
from .views import (
|
|
RideModelListCreateAPIView,
|
|
RideModelDetailAPIView,
|
|
RideModelSearchAPIView,
|
|
RideModelFilterOptionsAPIView,
|
|
RideModelStatsAPIView,
|
|
RideModelVariantListCreateAPIView,
|
|
RideModelVariantDetailAPIView,
|
|
RideModelTechnicalSpecListCreateAPIView,
|
|
RideModelTechnicalSpecDetailAPIView,
|
|
RideModelPhotoListCreateAPIView,
|
|
RideModelPhotoDetailAPIView,
|
|
)
|
|
|
|
app_name = "api_v1_ride_models"
|
|
|
|
urlpatterns = [
|
|
# Core ride model endpoints - nested under manufacturer
|
|
path("", RideModelListCreateAPIView.as_view(), name="ride-model-list-create"),
|
|
path(
|
|
"<slug:ride_model_slug>/",
|
|
RideModelDetailAPIView.as_view(),
|
|
name="ride-model-detail",
|
|
),
|
|
# Search and filtering (global, not manufacturer-specific)
|
|
path("search/", RideModelSearchAPIView.as_view(), name="ride-model-search"),
|
|
path(
|
|
"filter-options/",
|
|
RideModelFilterOptionsAPIView.as_view(),
|
|
name="ride-model-filter-options",
|
|
),
|
|
# Statistics (global, not manufacturer-specific)
|
|
path("stats/", RideModelStatsAPIView.as_view(), name="ride-model-stats"),
|
|
# Ride model variants - using slug-based lookup
|
|
path(
|
|
"<slug:ride_model_slug>/variants/",
|
|
RideModelVariantListCreateAPIView.as_view(),
|
|
name="ride-model-variant-list-create",
|
|
),
|
|
path(
|
|
"<slug:ride_model_slug>/variants/<int:pk>/",
|
|
RideModelVariantDetailAPIView.as_view(),
|
|
name="ride-model-variant-detail",
|
|
),
|
|
# Technical specifications - using slug-based lookup
|
|
path(
|
|
"<slug:ride_model_slug>/technical-specs/",
|
|
RideModelTechnicalSpecListCreateAPIView.as_view(),
|
|
name="ride-model-technical-spec-list-create",
|
|
),
|
|
path(
|
|
"<slug:ride_model_slug>/technical-specs/<int:pk>/",
|
|
RideModelTechnicalSpecDetailAPIView.as_view(),
|
|
name="ride-model-technical-spec-detail",
|
|
),
|
|
# Photos - using slug-based lookup
|
|
path(
|
|
"<slug:ride_model_slug>/photos/",
|
|
RideModelPhotoListCreateAPIView.as_view(),
|
|
name="ride-model-photo-list-create",
|
|
),
|
|
path(
|
|
"<slug:ride_model_slug>/photos/<int:pk>/",
|
|
RideModelPhotoDetailAPIView.as_view(),
|
|
name="ride-model-photo-detail",
|
|
),
|
|
]
|