Files
thrillwiki_django_no_react/backend/apps/api/v1/urls.py
pacnpal 04394b9976 Refactor user account system and remove moderation integration
- Remove first_name and last_name fields from User model
- Add user deletion and social provider services
- Restructure auth serializers into separate directory
- Update avatar upload functionality and API endpoints
- Remove django-moderation integration documentation
- Add mandatory compliance enforcement rules
- Update frontend documentation with API usage examples
2025-08-30 07:31:58 -04:00

80 lines
2.8 KiB
Python

"""
URL configuration for ThrillWiki API v1.
This module provides unified API routing following RESTful conventions
and DRF Router patterns for automatic URL generation.
"""
from .viewsets_rankings import RideRankingViewSet, TriggerRankingCalculationView
# Import other views from the views directory
from .views import (
HealthCheckAPIView,
PerformanceMetricsAPIView,
SimpleHealthAPIView,
# Trending system views
TrendingAPIView,
NewContentAPIView,
TriggerTrendingCalculationAPIView,
)
from .views.stats import StatsAPIView, StatsRecalculateAPIView
from .views.reviews import LatestReviewsAPIView
from django.urls import path, include
from rest_framework.routers import DefaultRouter
# Create the main API router
router = DefaultRouter()
# Register ranking endpoints
router.register(r"rankings", RideRankingViewSet, basename="ranking")
app_name = "api_v1"
urlpatterns = [
# API Documentation endpoints are handled by main Django URLs
# See backend/thrillwiki/urls.py for documentation endpoints
# Authentication endpoints
path("auth/", include("apps.api.v1.auth.urls")),
# Health check endpoints
path("health/", HealthCheckAPIView.as_view(), name="health-check"),
path("health/simple/", SimpleHealthAPIView.as_view(), name="simple-health"),
path(
"health/performance/",
PerformanceMetricsAPIView.as_view(),
name="performance-metrics",
),
# Trending system endpoints
path("trending/", TrendingAPIView.as_view(), name="trending"),
path("new-content/", NewContentAPIView.as_view(), name="new-content"),
path(
"trending/calculate/",
TriggerTrendingCalculationAPIView.as_view(),
name="trigger-trending-calculation",
),
# Statistics endpoints
path("stats/", StatsAPIView.as_view(), name="stats"),
path(
"stats/recalculate/",
StatsRecalculateAPIView.as_view(),
name="stats-recalculate",
),
# Reviews endpoints
path("reviews/latest/", LatestReviewsAPIView.as_view(), name="latest-reviews"),
# Ranking system endpoints
path(
"rankings/calculate/",
TriggerRankingCalculationView.as_view(),
name="trigger-ranking-calculation",
),
# Domain-specific API endpoints
path("parks/", include("apps.api.v1.parks.urls")),
path("rides/", include("apps.api.v1.rides.urls")),
path("accounts/", include("apps.api.v1.accounts.urls")),
path("history/", include("apps.api.v1.history.urls")),
path("email/", include("apps.api.v1.email.urls")),
path("core/", include("apps.api.v1.core.urls")),
path("maps/", include("apps.api.v1.maps.urls")),
path("moderation/", include("apps.moderation.urls")),
# Include router URLs (for rankings and any other router-registered endpoints)
path("", include(router.urls)),
]