mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 15:31:08 -05:00
Enhance moderation dashboard UI and UX:
- Add HTMX-powered filtering with instant updates - Add smooth transitions and loading states - Improve visual hierarchy and styling - Add review notes functionality - Add confirmation dialogs for actions - Make navigation sticky - Add hover effects and visual feedback - Improve dark mode support
This commit is contained in:
@@ -4,14 +4,16 @@ from django.utils.text import slugify
|
||||
from django.contrib.contenttypes.fields import GenericRelation
|
||||
from django.core.exceptions import ValidationError
|
||||
from decimal import Decimal, ROUND_DOWN, InvalidOperation
|
||||
from typing import Tuple, Optional, Any
|
||||
from simple_history.models import HistoricalRecords
|
||||
from typing import Tuple, Optional, Any, TYPE_CHECKING
|
||||
|
||||
from companies.models import Company
|
||||
from media.models import Photo
|
||||
from history_tracking.models import HistoricalModel
|
||||
from location.models import Location
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from rides.models import Ride
|
||||
|
||||
|
||||
class Park(HistoricalModel):
|
||||
id: int # Type hint for Django's automatic id field
|
||||
@@ -55,6 +57,8 @@ class Park(HistoricalModel):
|
||||
Company, on_delete=models.SET_NULL, null=True, blank=True, related_name="parks"
|
||||
)
|
||||
photos = GenericRelation(Photo, related_query_name="park")
|
||||
areas: models.Manager['ParkArea'] # Type hint for reverse relation
|
||||
rides: models.Manager['Ride'] # Type hint for reverse relation from rides app
|
||||
|
||||
# Metadata
|
||||
created_at = models.DateTimeField(auto_now_add=True, null=True)
|
||||
|
||||
Reference in New Issue
Block a user