major changes, including tailwind v4

This commit is contained in:
pacnpal
2025-08-15 12:24:20 -04:00
parent f6c8e0e25c
commit da7c7e3381
261 changed files with 22783 additions and 10465 deletions

View File

@@ -2,30 +2,29 @@ from django.test import TestCase, Client
from django.urls import reverse
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.contrib.contenttypes.models import ContentType
from django.contrib.gis.geos import Point
from django.http import HttpResponse
from typing import cast, Optional, Tuple
from .models import Park, ParkArea
from operators.models import Operator
from location.models import Location
from parks.models.companies import Operator
from parks.models.location import ParkLocation
User = get_user_model()
def create_test_location(park: Park) -> Location:
def create_test_location(park: Park) -> ParkLocation:
"""Helper function to create a test location"""
return Location.objects.create(
content_type=ContentType.objects.get_for_model(Park),
object_id=park.id,
name='Test Park Location',
location_type='park',
park_location = ParkLocation.objects.create(
park=park,
street_address='123 Test St',
city='Test City',
state='TS',
country='Test Country',
postal_code='12345',
point=Point(-118.2437, 34.0522)
postal_code='12345'
)
# Set coordinates using the helper method
park_location.set_coordinates(34.0522, -118.2437) # latitude, longitude
park_location.save()
return park_location
class ParkModelTests(TestCase):
@classmethod