mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 12:51:11 -05:00
Add operators and property owners functionality
- Implemented OperatorListView and OperatorDetailView for managing operators. - Created corresponding templates for operator listing and detail views. - Added PropertyOwnerListView and PropertyOwnerDetailView for managing property owners. - Developed templates for property owner listing and detail views. - Established relationships between parks and operators, and parks and property owners in the models. - Created migrations to reflect the new relationships and fields in the database. - Added admin interfaces for PropertyOwner management. - Implemented tests for operators and property owners.
This commit is contained in:
@@ -6,7 +6,7 @@ from django.core.exceptions import PermissionDenied
|
||||
from search.mixins import RideAutocomplete
|
||||
from rides.models import Ride
|
||||
from parks.models import Park
|
||||
from companies.models import Company
|
||||
from operators.models import Operator
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
@@ -22,13 +22,13 @@ class RideAutocompleteTest(TestCase):
|
||||
password='testpass123'
|
||||
)
|
||||
|
||||
# Create test company and park
|
||||
self.company = Company.objects.create(
|
||||
name='Test Company'
|
||||
# Create test operator and park
|
||||
self.operator = Operator.objects.create(
|
||||
name='Test Operator'
|
||||
)
|
||||
self.park = Park.objects.create(
|
||||
name='Test Park',
|
||||
owner=self.company,
|
||||
operator=self.operator,
|
||||
status='OPERATING'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user