mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-30 03:07:00 -05:00
feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.
This commit is contained in:
@@ -3,17 +3,17 @@ Custom managers and QuerySets for Parks models.
|
||||
Optimized queries following Django styleguide patterns.
|
||||
"""
|
||||
|
||||
from django.db.models import Q, Count, Avg, Max, Min, Prefetch
|
||||
from django.db.models import Avg, Count, Max, Min, Prefetch, Q
|
||||
|
||||
from apps.core.managers import (
|
||||
BaseQuerySet,
|
||||
BaseManager,
|
||||
LocationQuerySet,
|
||||
BaseQuerySet,
|
||||
LocationManager,
|
||||
ReviewableQuerySet,
|
||||
LocationQuerySet,
|
||||
ReviewableManager,
|
||||
StatusQuerySet,
|
||||
ReviewableQuerySet,
|
||||
StatusManager,
|
||||
StatusQuerySet,
|
||||
)
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ class ParkQuerySet(StatusQuerySet, ReviewableQuerySet, LocationQuerySet):
|
||||
def optimized_for_detail(self):
|
||||
"""Optimize for park detail display."""
|
||||
from apps.rides.models import Ride
|
||||
|
||||
from .models import ParkReview
|
||||
|
||||
return self.select_related("operator", "property_owner").prefetch_related(
|
||||
|
||||
Reference in New Issue
Block a user