Skip to content

Commit

Permalink
admin: inline edit section
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Aug 1, 2015
1 parent 91ae3de commit 55814a5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion symposion/conference/admin.py
Expand Up @@ -3,7 +3,18 @@
from symposion.conference.models import Conference, Section


admin.site.register(Conference, list_display=("title", "start_date", "end_date"))
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",)},
Expand Down

0 comments on commit 55814a5

Please sign in to comment.