mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 17:51:09 -05:00
Add secret management guide, client-side performance monitoring, and search accessibility enhancements
- Introduced a comprehensive Secret Management Guide detailing best practices, secret classification, development setup, production management, rotation procedures, and emergency protocols. - Implemented a client-side performance monitoring script to track various metrics including page load performance, paint metrics, layout shifts, and memory usage. - Enhanced search accessibility with keyboard navigation support for search results, ensuring compliance with WCAG standards and improving user experience.
This commit is contained in:
@@ -3,6 +3,12 @@ Park API views for ThrillWiki API v1.
|
||||
|
||||
This module contains consolidated park photo viewset for the centralized API structure.
|
||||
Enhanced from rogue implementation to maintain full feature parity.
|
||||
|
||||
Caching Strategy:
|
||||
- HybridParkAPIView: 10 minutes (600s) - park lists are queried frequently
|
||||
- ParkFilterMetadataAPIView: 30 minutes (1800s) - filter metadata is stable
|
||||
- ParkPhotoViewSet.list/retrieve: 5 minutes (300s) - photos may be updated
|
||||
- ParkPhotoViewSet.stats: 10 minutes (600s) - stats are aggregated
|
||||
"""
|
||||
|
||||
import logging
|
||||
@@ -27,6 +33,7 @@ from apps.core.exceptions import (
|
||||
ValidationException,
|
||||
)
|
||||
from apps.core.utils.error_handling import ErrorHandler
|
||||
from apps.core.decorators.cache_decorators import cache_api_response
|
||||
from apps.parks.models import Park, ParkPhoto
|
||||
from apps.parks.services import ParkMediaService
|
||||
from apps.parks.services.hybrid_loader import smart_park_loader
|
||||
@@ -714,10 +721,14 @@ class HybridParkAPIView(APIView):
|
||||
Automatically chooses between client-side and server-side filtering
|
||||
based on data size and complexity. Provides progressive loading
|
||||
for large datasets and complete data for smaller sets.
|
||||
|
||||
Caching: 10-minute timeout (600s) - park lists are queried frequently
|
||||
but need to reflect new additions within reasonable time.
|
||||
"""
|
||||
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
@cache_api_response(timeout=600, key_prefix="hybrid_parks")
|
||||
def get(self, request):
|
||||
"""Get parks with hybrid filtering strategy."""
|
||||
# Extract filters from query parameters
|
||||
@@ -950,10 +961,14 @@ class ParkFilterMetadataAPIView(APIView):
|
||||
|
||||
Provides information about available filter options and ranges
|
||||
to help build dynamic filter interfaces.
|
||||
|
||||
Caching: 30-minute timeout (1800s) - filter metadata is stable
|
||||
and only changes when new entities are added.
|
||||
"""
|
||||
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
@cache_api_response(timeout=1800, key_prefix="park_filter_metadata")
|
||||
def get(self, request):
|
||||
"""Get park filter metadata."""
|
||||
# Check if metadata should be scoped to current filters
|
||||
|
||||
Reference in New Issue
Block a user