summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-12-20 21:14:35 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-12-20 21:14:35 (GMT)
commitb92ef203930795f69dd69770fb1f913a14eebfdc (patch)
tree4db736113e6176306f57235150e8f06ebe30f94d
parent83a01c08e3c29a6a8ca64d7d1458dd67c81e59bd (diff)
tweaked inline admin
made most of the fields of of timeslots and programmslots read-only.
-rw-r--r--program/admin.py6
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')