mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 06:11:07 -05:00
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.
This commit is contained in:
14
manufacturers/admin.py
Normal file
14
manufacturers/admin.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.contrib import admin
|
||||
from .models import Manufacturer
|
||||
|
||||
|
||||
class ManufacturerAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'headquarters', 'founded_year', 'rides_count', 'coasters_count', 'created_at', 'updated_at')
|
||||
list_filter = ('founded_year',)
|
||||
search_fields = ('name', 'description', 'headquarters')
|
||||
readonly_fields = ('created_at', 'updated_at', 'rides_count', 'coasters_count')
|
||||
prepopulated_fields = {'slug': ('name',)}
|
||||
|
||||
|
||||
# Register the model with admin
|
||||
admin.site.register(Manufacturer, ManufacturerAdmin)
|
||||
Reference in New Issue
Block a user