diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2016-04-16 17:26:43 (GMT) |
---|---|---|
committer | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2016-04-16 17:26:43 (GMT) |
commit | 7830905599daec37d1399b63ab7c02a2bce63e21 (patch) | |
tree | 89602048d60dfcae171ebf99b075380f820e533e | |
parent | fa75617ab820bf23fecec6c038cc9b747a70ba4b (diff) |
simplified inline admin for program slots and time slots
-rw-r--r-- | program/admin.py | 5 |
1 files changed, 3 insertions, 2 deletions
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') |