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