mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
Refactor API structure and add comprehensive user management features
- Restructure API v1 with improved serializers organization - Add user deletion requests and moderation queue system - Implement bulk moderation operations and permissions - Add user profile enhancements with display names and avatars - Expand ride and park API endpoints with better filtering - Add manufacturer API with detailed ride relationships - Improve authentication flows and error handling - Update frontend documentation and API specifications
This commit is contained in:
@@ -35,8 +35,7 @@ class ParkPhoto(TrackedModel):
|
||||
)
|
||||
|
||||
image = CloudflareImagesField(
|
||||
variant="public",
|
||||
help_text="Park photo stored on Cloudflare Images"
|
||||
variant="public", help_text="Park photo stored on Cloudflare Images"
|
||||
)
|
||||
|
||||
caption = models.CharField(max_length=255, blank=True)
|
||||
@@ -93,7 +92,9 @@ class ParkPhoto(TrackedModel):
|
||||
ParkPhoto.objects.filter(
|
||||
park=self.park,
|
||||
is_primary=True,
|
||||
).exclude(pk=self.pk).update(is_primary=False)
|
||||
).exclude(
|
||||
pk=self.pk
|
||||
).update(is_primary=False)
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class Park(TrackedModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name="parks_using_as_banner",
|
||||
help_text="Photo to use as banner image for this park"
|
||||
help_text="Photo to use as banner image for this park",
|
||||
)
|
||||
card_image = models.ForeignKey(
|
||||
"ParkPhoto",
|
||||
@@ -71,7 +71,7 @@ class Park(TrackedModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name="parks_using_as_card",
|
||||
help_text="Photo to use as card image for this park"
|
||||
help_text="Photo to use as card image for this park",
|
||||
)
|
||||
|
||||
# Relationships
|
||||
@@ -173,7 +173,7 @@ class Park(TrackedModel):
|
||||
self.slug = slugify(self.name)
|
||||
|
||||
# Generate frontend URL
|
||||
frontend_domain = getattr(settings, 'FRONTEND_DOMAIN', 'https://thrillwiki.com')
|
||||
frontend_domain = getattr(settings, "FRONTEND_DOMAIN", "https://thrillwiki.com")
|
||||
self.url = f"{frontend_domain}/parks/{self.slug}/"
|
||||
|
||||
# Save the model
|
||||
|
||||
Reference in New Issue
Block a user