mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:11:08 -05:00
major changes, including tailwind v4
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
from django.utils import timezone
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.contrib.gis.geos import Point
|
||||
from parks.models import Park
|
||||
from parks.models import Park, ParkLocation
|
||||
from rides.models import Ride, RideModel, RollerCoasterStats
|
||||
from manufacturers.models import Manufacturer
|
||||
from location.models import Location
|
||||
from rides.models import Manufacturer
|
||||
|
||||
# Create Cedar Point
|
||||
park, _ = Park.objects.get_or_create(
|
||||
@@ -19,22 +17,19 @@ park, _ = Park.objects.get_or_create(
|
||||
)
|
||||
|
||||
# Create location for Cedar Point
|
||||
Location.objects.get_or_create(
|
||||
content_type=ContentType.objects.get_for_model(Park),
|
||||
object_id=park.id,
|
||||
location, _ = ParkLocation.objects.get_or_create(
|
||||
park=park,
|
||||
defaults={
|
||||
"name": "Cedar Point",
|
||||
"location_type": "amusement_park",
|
||||
"street_address": "1 Cedar Point Dr",
|
||||
"city": "Sandusky",
|
||||
"state": "OH",
|
||||
"postal_code": "44870",
|
||||
"country": "USA",
|
||||
"latitude": 41.4822,
|
||||
"longitude": -82.6839,
|
||||
"point": Point(-82.6839, 41.4822) # longitude, latitude
|
||||
}
|
||||
)
|
||||
# Set coordinates using the helper method
|
||||
location.set_coordinates(-82.6839, 41.4822) # longitude, latitude
|
||||
location.save()
|
||||
|
||||
# Create Intamin as manufacturer
|
||||
bm, _ = Manufacturer.objects.get_or_create(
|
||||
|
||||
Reference in New Issue
Block a user