feat: Implement centralized error capture and handling with new middleware, services, and API endpoints, and add new admin and statistics API views.

This commit is contained in:
pacnpal
2026-01-02 15:55:42 -05:00
parent 1adba1b804
commit 95700c7d7b
43 changed files with 2477 additions and 158 deletions

View File

@@ -10,10 +10,13 @@ from rest_framework.routers import DefaultRouter
# Import other views from the views directory
from .views import (
CoasterStatisticsAPIView,
DataCompletenessAPIView,
HealthCheckAPIView,
NewContentAPIView,
PerformanceMetricsAPIView,
SimpleHealthAPIView,
TechnicalSpecificationsAPIView,
# Trending system views
TrendingAPIView,
TriggerTrendingCalculationAPIView,
@@ -71,6 +74,23 @@ urlpatterns = [
TriggerRankingCalculationView.as_view(),
name="trigger-ranking-calculation",
),
# Admin endpoints
path(
"admin/data-completeness/",
DataCompletenessAPIView.as_view(),
name="data-completeness",
),
# Ride search advanced endpoints (for useAdvancedRideSearch composable)
path(
"rides/technical-specifications/",
TechnicalSpecificationsAPIView.as_view(),
name="technical-specifications",
),
path(
"rides/coaster-statistics/",
CoasterStatisticsAPIView.as_view(),
name="coaster-statistics",
),
# Domain-specific API endpoints
path("parks/", include("apps.api.v1.parks.urls")),
path("rides/", include("apps.api.v1.rides.urls")),
@@ -86,9 +106,11 @@ urlpatterns = [
path("media/", include("apps.media.urls")),
path("blog/", include("apps.blog.urls")),
path("support/", include("apps.support.urls")),
path("errors/", include("apps.core.urls.errors")),
path("images/", include("apps.api.v1.images.urls")),
# Cloudflare Images Toolkit API endpoints
path("cloudflare-images/", include("django_cloudflareimages_toolkit.urls")),
# Include router URLs (for rankings and any other router-registered endpoints)
path("", include(router.urls)),
]