feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.

This commit is contained in:
pacnpal
2025-12-28 17:32:53 -05:00
parent aa56c46c27
commit c95f99ca10
452 changed files with 7948 additions and 6073 deletions

View File

@@ -208,110 +208,3 @@ class Command(BaseCommand):
# Park creation data - will be used to create parks in the database
# See FUTURE_WORK.md - THRILLWIKI-111 for implementation plan
parks_data = [
{
"name": "Magic Kingdom",
"slug": "magic-kingdom",
"operator_slug": "walt-disney-company",
"property_owner_slug": "walt-disney-company",
"description": "The first theme park at Walt Disney World Resort in Florida, opened in 1971.",
"opening_date": "1971-10-01",
"size_acres": 142,
"website": "https://disneyworld.disney.go.com/destinations/magic-kingdom/",
"location": {
"street_address": "1180 Seven Seas Dr",
"city": "Lake Buena Vista",
"state_province": "Florida",
"country": "USA",
"postal_code": "32830",
"latitude": 28.4177,
"longitude": -81.5812,
},
},
{
"name": "Universal Studios Florida",
"slug": "universal-studios-florida",
"operator_slug": "universal-parks-resorts",
"property_owner_slug": "universal-parks-resorts",
"description": "Movie and television-based theme park in Orlando, Florida.",
"opening_date": "1990-06-07",
"size_acres": 108,
"website": "https://www.universalorlando.com/web/en/us/theme-parks/universal-studios-florida",
"location": {
"street_address": "6000 Universal Blvd",
"city": "Orlando",
"state_province": "Florida",
"country": "USA",
"postal_code": "32819",
"latitude": 28.4749,
"longitude": -81.4687,
},
},
{
"name": "Cedar Point",
"slug": "cedar-point",
"operator_slug": "cedar-fair-entertainment",
"property_owner_slug": "cedar-fair-entertainment",
"description": 'Known as the "Roller Coaster Capital of the World".',
"opening_date": "1870-06-01",
"size_acres": 364,
"website": "https://www.cedarpoint.com/",
"location": {
"street_address": "1 Cedar Point Dr",
"city": "Sandusky",
"state_province": "Ohio",
"country": "USA",
"postal_code": "44870",
"latitude": 41.4822,
"longitude": -82.6835,
},
},
{
"name": "Six Flags Magic Mountain",
"slug": "six-flags-magic-mountain",
"operator_slug": "six-flags-entertainment",
"property_owner_slug": "six-flags-entertainment",
"description": "Known for its world-record 19 roller coasters.",
"opening_date": "1971-05-29",
"size_acres": 262,
"website": "https://www.sixflags.com/magicmountain",
"location": {
"street_address": "26101 Magic Mountain Pkwy",
"city": "Valencia",
"state_province": "California",
"country": "USA",
"postal_code": "91355",
"latitude": 34.4253,
"longitude": -118.5971,
},
},
{
"name": "Europa-Park",
"slug": "europa-park",
"operator_slug": "merlin-entertainments",
"property_owner_slug": "merlin-entertainments",
"description": "One of the most popular theme parks in Europe, located in Germany.",
"opening_date": "1975-07-12",
"size_acres": 234,
"website": "https://www.europapark.de/",
"location": {
"street_address": "Europa-Park-Straße 2",
"city": "Rust",
"state_province": "Baden-Württemberg",
"country": "Germany",
"postal_code": "77977",
"latitude": 48.2667,
"longitude": 7.7167,
},
},
{
"name": "Alton Towers",
"slug": "alton-towers",
"operator_slug": "merlin-entertainments",
"property_owner_slug": "merlin-entertainments",
"description": "Major theme park and former country estate in Staffordshire, England.",
"opening_date": "1980-04-23",
"size_acres": 500,
# Add other fields as needed
},
]

View File

@@ -1,5 +1,7 @@
from django.core.management.base import BaseCommand
from apps.parks.models import Park, ParkArea, ParkLocation, Company as Operator
from apps.parks.models import Company as Operator
from apps.parks.models import Park, ParkArea, ParkLocation
class Command(BaseCommand):

View File

@@ -1,16 +1,17 @@
from django.core.management.base import BaseCommand
from django.db import transaction, connection
import logging
from apps.parks.models import Company, Park, ParkArea, ParkReview, ParkLocation
from apps.rides.models.company import Company as RideCompany
from django.core.management.base import BaseCommand
from django.db import transaction
from apps.accounts.models import User
from apps.parks.models import Company, Park, ParkArea, ParkLocation, ParkReview
from apps.rides.models import (
Ride,
RideModel,
RideReview,
RollerCoasterStats,
)
from apps.accounts.models import User
from apps.rides.models.company import Company as RideCompany
class Command(BaseCommand):

View File

@@ -1,5 +1,6 @@
from django.core.management.base import BaseCommand
from apps.parks.models import Park, ParkLocation, Company
from apps.parks.models import Company, Park, ParkLocation
class Command(BaseCommand):
@@ -100,8 +101,8 @@ class Command(BaseCommand):
# Test spatial indexing
self.stdout.write("\n🔍 Testing spatial queries:")
try:
from django.contrib.gis.measure import D
from django.contrib.gis.geos import Point
from django.contrib.gis.measure import D
# Find parks within 100km of a point
# Same as Disneyland

View File

@@ -1,5 +1,6 @@
from django.core.management.base import BaseCommand
from django.db.models import Q
from apps.parks.models import Park