mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 16:51:07 -05:00
major changes, including tailwind v4
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.utils import timezone
|
||||
from operators.models import Operator
|
||||
from parks.models.companies import Operator
|
||||
from parks.models import Park, ParkArea
|
||||
from location.models import Location
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from parks.models.location import ParkLocation
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Seeds initial park data with major theme parks worldwide'
|
||||
@@ -218,18 +217,20 @@ class Command(BaseCommand):
|
||||
# Create location for park
|
||||
if created:
|
||||
loc_data = park_data['location']
|
||||
park_content_type = ContentType.objects.get_for_model(Park)
|
||||
Location.objects.create(
|
||||
content_type=park_content_type,
|
||||
object_id=park.id,
|
||||
park_location = ParkLocation.objects.create(
|
||||
park=park,
|
||||
street_address=loc_data['street_address'],
|
||||
city=loc_data['city'],
|
||||
state=loc_data['state'],
|
||||
country=loc_data['country'],
|
||||
postal_code=loc_data['postal_code'],
|
||||
latitude=loc_data['latitude'],
|
||||
longitude=loc_data['longitude']
|
||||
postal_code=loc_data['postal_code']
|
||||
)
|
||||
# Set coordinates using the helper method
|
||||
park_location.set_coordinates(
|
||||
loc_data['latitude'],
|
||||
loc_data['longitude']
|
||||
)
|
||||
park_location.save()
|
||||
|
||||
# Create areas for park
|
||||
for area_data in park_data['areas']:
|
||||
|
||||
Reference in New Issue
Block a user