From 7830905599daec37d1399b63ab7c02a2bce63e21 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Sat, 16 Apr 2016 19:26:43 +0200 Subject: simplified inline admin for program slots and time slots diff --git a/program/admin.py b/program/admin.py index e6c331a..406d73f 100644 --- a/program/admin.py +++ b/program/admin.py @@ -58,11 +58,12 @@ class NoteAdmin(admin.ModelAdmin): class TimeSlotInline(admin.TabularInline): model = TimeSlot - + ordering = ('-end',) class ProgramSlotAdmin(admin.ModelAdmin): actions = ('renew',) inlines = (TimeSlotInline,) + fields = (('rrule', 'byweekday'), ('dstart', 'tstart', 'tend'), 'until', 'is_repetition', 'automation_id') list_display = ('show', 'byweekday', 'rrule', 'tstart', 'tend', 'until') list_filter = ('byweekday', 'rrule', 'is_repetition', 'is_active') ordering = ('byweekday', 'dstart') @@ -83,7 +84,7 @@ class ProgramSlotAdmin(admin.ModelAdmin): class ProgramSlotInline(admin.TabularInline): model = ProgramSlot - + ordering = ('-until',) class ShowAdmin(admin.ModelAdmin): filter_horizontal = ('hosts', 'owners', 'musicfocus', 'showinformation', 'showtopic') -- cgit v0.10.2