Files
thrillwiki_django_no_react/property_owners/admin.py
pacnpal 751cd86a31 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.
2025-07-04 14:49:36 -04:00

14 lines
410 B
Python

from django.contrib import admin
from .models import PropertyOwner
class PropertyOwnerAdmin(admin.ModelAdmin):
list_display = ('name', 'website', 'created_at', 'updated_at')
search_fields = ('name', 'description')
readonly_fields = ('created_at', 'updated_at')
prepopulated_fields = {'slug': ('name',)}
# Register the model with admin
admin.site.register(PropertyOwner, PropertyOwnerAdmin)