symposion_app/vendor/symposion/conference/admin.py

23 lines
546 B
Python
Raw Normal View History

2012-02-06 02:59:14 +00:00
from django.contrib import admin
2012-05-29 19:08:05 +00:00
from symposion.conference.models import Conference, Section
2012-02-06 02:59:14 +00:00
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)
2012-07-12 04:38:01 +00:00
admin.site.register(
Section,
2014-07-30 18:19:26 +00:00
prepopulated_fields={"slug": ("name",)},
list_display=("name", "conference", "start_date", "end_date")
2012-07-12 04:38:01 +00:00
)