diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-12-20 21:14:35 (GMT) |
---|---|---|
committer | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-12-20 21:14:35 (GMT) |
commit | b92ef203930795f69dd69770fb1f913a14eebfdc (patch) | |
tree | 4db736113e6176306f57235150e8f06ebe30f94d | |
parent | 83a01c08e3c29a6a8ca64d7d1458dd67c81e59bd (diff) |
tweaked inline admin
made most of the fields of of timeslots and programmslots read-only.
-rw-r--r-- | program/admin.py | 6 |
1 files changed, 6 insertions, 0 deletions
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') |