Use filter_vertical for sessions in admin

This commit is contained in:
James Polley 2018-01-10 22:25:34 +11:00
parent f99765ca0b
commit 98e0abf30c

View file

@ -59,6 +59,9 @@ class TrackAdmin(admin.ModelAdmin):
list_display=("name","room","day") list_display=("name","room","day")
list_editable=("room","day") list_editable=("room","day")
class SessionAdmin(admin.ModelAdmin):
model = Session,
filter_vertical=["slots"]
admin.site.register(Day) admin.site.register(Day)
admin.site.register( admin.site.register(
@ -72,7 +75,7 @@ admin.site.register(
admin.site.register(Schedule, ScheduleAdmin) admin.site.register(Schedule, ScheduleAdmin)
admin.site.register(Room, RoomAdmin) admin.site.register(Room, RoomAdmin)
admin.site.register(Slot, SlotAdmin) admin.site.register(Slot, SlotAdmin)
admin.site.register(Session) admin.site.register(Session, SessionAdmin)
admin.site.register(SessionRole) admin.site.register(SessionRole)
admin.site.register(Presentation, PresentationAdmin) admin.site.register(Presentation, PresentationAdmin)
admin.site.register(Track, TrackAdmin) admin.site.register(Track, TrackAdmin)