mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 20:51:09 -05:00
Refactor code structure and remove redundant changes
This commit is contained in:
@@ -39,21 +39,17 @@ urlpatterns = [
|
||||
path("", HomeView.as_view(), name="home"),
|
||||
# Health Check URLs
|
||||
path("health/", include("health_check.urls")),
|
||||
# New Consolidated API v1 URLs
|
||||
path("api/v1/", include("apps.api.v1.urls", namespace="api_v1")),
|
||||
# Centralized API URLs - routes through main API router
|
||||
path("api/", include("api.urls")),
|
||||
# All API endpoints are now consolidated under /api/v1/
|
||||
path(
|
||||
"api/v1/map/", include("apps.core.urls.map_urls", namespace="map_api")
|
||||
), # Map API URLs
|
||||
# Parks and Rides URLs
|
||||
path("parks/", include("apps.parks.urls", namespace="parks")),
|
||||
# Global rides URLs
|
||||
path("rides/", include("apps.rides.urls", namespace="rides")),
|
||||
# Operators URLs
|
||||
path("operators/", include("apps.parks.urls", namespace="operators")),
|
||||
# Other URLs
|
||||
path("photos/", include("apps.media.urls", namespace="photos")),
|
||||
# Add photos URLs
|
||||
# Note: Photo URLs now handled through centralized API at /api/v1/media/
|
||||
# Legacy photo namespace removed - functionality moved to domain-specific APIs
|
||||
path("search/", include("apps.core.urls.search", namespace="search")),
|
||||
path("maps/", include("apps.core.urls.maps", namespace="maps")),
|
||||
# Map HTML views
|
||||
@@ -100,7 +96,9 @@ urlpatterns = [
|
||||
]
|
||||
|
||||
# Add autocomplete URLs if available
|
||||
if HAS_AUTOCOMPLETE:
|
||||
try:
|
||||
from autocomplete import urls as autocomplete_urls
|
||||
|
||||
urlpatterns.insert(
|
||||
2,
|
||||
path(
|
||||
@@ -111,6 +109,8 @@ if HAS_AUTOCOMPLETE:
|
||||
),
|
||||
),
|
||||
)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Add API Documentation URLs if available
|
||||
if HAS_SPECTACULAR:
|
||||
@@ -129,6 +129,9 @@ if HAS_SPECTACULAR:
|
||||
),
|
||||
]
|
||||
)
|
||||
else:
|
||||
# Do not add API documentation URLs if drf_spectacular is not installed
|
||||
pass
|
||||
|
||||
# Health check API endpoints are now available at /api/v1/health/
|
||||
|
||||
@@ -148,7 +151,6 @@ if settings.DEBUG:
|
||||
pass
|
||||
|
||||
try:
|
||||
pass
|
||||
|
||||
urlpatterns += [path("silk/", include("silk.urls", namespace="silk"))]
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user