21 lines
529 B
Python
21 lines
529 B
Python
from django.contrib import admin
|
|
|
|
from .models import Event, EventMedia, EventTag
|
|
|
|
admin.site.register(EventTag)
|
|
|
|
@admin.register(Event)
|
|
class EventAdmin(admin.ModelAdmin):
|
|
list_display = ("title", "date", "date_tentative", "location")
|
|
list_filter = ['date']
|
|
date_hierarchy = 'date'
|
|
search_fields = ["title", "description", "earth_location"]
|
|
prepopulated_fields = {'slug' : ("title",) }
|
|
|
|
|
|
@admin.register(EventMedia)
|
|
class EventMediaAdmin(admin.ModelAdmin):
|
|
list_display = ("event", "format", "novel")
|
|
|
|
|
|
|