Add comprehensive API documentation for ThrillWiki integration and features

- Introduced Next.js integration guide for ThrillWiki API, detailing authentication, core domain APIs, data structures, and implementation patterns.
- Documented the migration to Rich Choice Objects, highlighting changes for frontend developers and enhanced metadata availability.
- Fixed the missing `get_by_slug` method in the Ride model, ensuring proper functionality of ride detail endpoints.
- Created a test script to verify manufacturer syncing with ride models, ensuring data integrity across related models.
This commit is contained in:
pacnpal
2025-09-16 11:29:17 -04:00
parent 61d73a2147
commit c2c26cfd1d
98 changed files with 11476 additions and 4803 deletions

View File

@@ -25,17 +25,21 @@ def get_ride_display_changes(changes: Dict) -> Dict:
# Format specific fields
if field == "status":
from .models import Ride
choices = dict(Ride.STATUS_CHOICES)
old_value = choices.get(old_value, old_value)
new_value = choices.get(new_value, new_value)
from .choices import RIDE_STATUSES
choices = {choice.value: choice.label for choice in RIDE_STATUSES}
if old_value in choices:
old_value = choices[old_value]
if new_value in choices:
new_value = choices[new_value]
elif field == "post_closing_status":
from .models import Ride
choices = dict(Ride.POST_CLOSING_STATUS_CHOICES)
old_value = choices.get(old_value, old_value)
new_value = choices.get(new_value, new_value)
from .choices import POST_CLOSING_STATUSES
choices = {choice.value: choice.label for choice in POST_CLOSING_STATUSES}
if old_value in choices:
old_value = choices[old_value]
if new_value in choices:
new_value = choices[new_value]
display_changes[field_names[field]] = {
"old": old_value,
@@ -61,11 +65,13 @@ def get_ride_model_display_changes(changes: Dict) -> Dict:
# Format category field
if field == "category":
from .models import CATEGORY_CHOICES
from .choices import RIDE_CATEGORIES
choices = dict(CATEGORY_CHOICES)
old_value = choices.get(old_value, old_value)
new_value = choices.get(new_value, new_value)
choices = {choice.value: choice.label for choice in RIDE_CATEGORIES}
if old_value in choices:
old_value = choices[old_value]
if new_value in choices:
new_value = choices[new_value]
display_changes[field_names[field]] = {
"old": old_value,