symposion_app/vendor/symposion/conference/admin.py
Sachi King d95d66dac8 Taking one out of PyCon's (US) book
We're lock-step with symposion, and upstream is dead.
Vendor it.
2017-05-27 20:11:39 +10:00

22 lines
546 B
Python

from django.contrib import admin
from symposion.conference.models import Conference, Section
class SectionInline(admin.TabularInline):
model = Section
prepopulated_fields = {"slug": ("name",)}
extra = 1
class ConferenceAdmin(admin.ModelAdmin):
list_display = ("title", "start_date", "end_date")
inlines = [SectionInline, ]
admin.site.register(Conference, ConferenceAdmin)
admin.site.register(
Section,
prepopulated_fields={"slug": ("name",)},
list_display=("name", "conference", "start_date", "end_date")
)