major changes, including tailwind v4

This commit is contained in:
pacnpal
2025-08-15 12:24:20 -04:00
parent f6c8e0e25c
commit da7c7e3381
261 changed files with 22783 additions and 10465 deletions

View File

@@ -1,14 +1,26 @@
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from .models import Location
# DEPRECATED: This admin interface is deprecated.
# Location data has been migrated to domain-specific models:
# - ParkLocation in parks.models.location
# - RideLocation in rides.models.location
# - CompanyHeadquarters in parks.models.companies
#
# This admin interface is kept for data migration and cleanup purposes only.
@admin.register(Location)
class LocationAdmin(admin.ModelAdmin):
list_display = ('name', 'location_type', 'city', 'state', 'country')
list_display = ('name', 'location_type', 'city', 'state', 'country', 'created_at')
list_filter = ('location_type', 'country', 'state', 'city')
search_fields = ('name', 'street_address', 'city', 'state', 'country')
readonly_fields = ('created_at', 'updated_at')
readonly_fields = ('created_at', 'updated_at', 'content_type', 'object_id')
fieldsets = (
('⚠️ DEPRECATED MODEL', {
'description': 'This model is deprecated. Use domain-specific location models instead.',
'fields': (),
}),
('Basic Information', {
'fields': ('name', 'location_type')
}),
@@ -18,8 +30,9 @@ class LocationAdmin(admin.ModelAdmin):
('Address', {
'fields': ('street_address', 'city', 'state', 'country', 'postal_code')
}),
('Content Type', {
'fields': ('content_type', 'object_id')
('Content Type (Read Only)', {
'fields': ('content_type', 'object_id'),
'classes': ('collapse',)
}),
('Metadata', {
'fields': ('created_at', 'updated_at'),
@@ -29,3 +42,7 @@ class LocationAdmin(admin.ModelAdmin):
def get_queryset(self, request):
return super().get_queryset(request).select_related('content_type')
def has_add_permission(self, request):
# Prevent creating new generic Location objects
return False