- Event.source field updated: eventify, community, partner (radio select in form) - EventListAPI: fallback to all events when pincode returns < 6 - EventListAPI: include is_eventify_event and source in serializer - Admin API: add source to list serializer - Django admin: source in list_display, list_filter, list_editable - Event form template: proper radio button rendering for source field Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
586 B
Python
14 lines
586 B
Python
from django.contrib import admin
|
|
from .models import Event, EventImages
|
|
|
|
@admin.register(Event)
|
|
class EventAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'name', 'start_date', 'end_date', 'event_type', 'event_status', 'source', 'is_featured', 'is_top_event')
|
|
list_filter = ('event_status', 'event_type', 'source', 'is_featured', 'is_top_event')
|
|
list_editable = ('is_featured', 'is_top_event', 'source')
|
|
search_fields = ('name', 'place', 'district')
|
|
|
|
@admin.register(EventImages)
|
|
class EventImagesAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'event', 'is_primary')
|