From b92ef203930795f69dd69770fb1f913a14eebfdc Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Tue, 20 Dec 2011 17:14:35 -0400 Subject: tweaked inline admin made most of the fields of of timeslots and programmslots read-only. diff --git a/program/admin.py b/program/admin.py index 399be75..70dc53e 100644 --- a/program/admin.py +++ b/program/admin.py @@ -41,7 +41,10 @@ class NoteAdmin(admin.ModelAdmin): obj.save() class TimeSlotInline(admin.TabularInline): + extra = 0 + max_num = 1 model = TimeSlot + readonly_fields = ('start', 'end') class ProgramSlotAdmin(admin.ModelAdmin): inlines = (TimeSlotInline,) @@ -51,7 +54,10 @@ class ProgramSlotAdmin(admin.ModelAdmin): search_fields = ('show__name',) class ProgramSlotInline(admin.TabularInline): + extra = 0 + max_num = 1 model = ProgramSlot + readonly_fields = ('rrule', 'byweekday', 'dstart', 'tstart', 'tend', 'is_repetition') class ShowAdmin(admin.ModelAdmin): filter_horizontal = ('hosts', 'owners', 'musicfocus', 'showinformation', 'showtopic') -- cgit v0.10.2