summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-06-13 04:47:44 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-06-13 04:47:44 (GMT)
commit4313274eeb823448a156cf7891d6eb64efe67c13 (patch)
treee809273d90a7bfdbb47dd85e4becd215930e1fd5
parent4e874539b0f7df48bb10bfb2bfc1608e38a5e6a5 (diff)
parent43889586f9d4be5939b45cd0360081642f5aebb6 (diff)
Merge branch 'master' into stable
don't display show-id | title everywhere...
-rw-r--r--program/admin.py7
-rw-r--r--program/templates/timeslot_detail.html2
2 files changed, 7 insertions, 2 deletions
diff --git a/program/admin.py b/program/admin.py
index 91ac63d..665ece2 100644
--- a/program/admin.py
+++ b/program/admin.py
@@ -65,7 +65,7 @@ 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_display = ('get_show_name', 'byweekday', 'rrule', 'tstart', 'tend', 'until')
list_filter = ('byweekday', 'rrule', 'is_repetition', 'is_active')
ordering = ('byweekday', 'dstart')
save_on_top = True
@@ -82,6 +82,11 @@ class ProgramSlotAdmin(admin.ModelAdmin):
self.message_user(request, message)
renew.short_description = _("Renew selected program slots")
+ def get_show_name(self, obj):
+ return obj.show.name
+ get_show_name.admin_order_field = 'show'
+ get_show_name.short_description = "Show"
+
class ProgramSlotInline(admin.TabularInline):
model = ProgramSlot
diff --git a/program/templates/timeslot_detail.html b/program/templates/timeslot_detail.html
index e0e4e52..cfe2b7b 100644
--- a/program/templates/timeslot_detail.html
+++ b/program/templates/timeslot_detail.html
@@ -1,6 +1,6 @@
<html>
<head>
- <title>Sendung: {{ timeslot }} &mdash; Radio Helsinki - Freies Radio Graz</title>
+ <title>Sendung: {{ timeslot.show.name }} &mdash; Radio Helsinki - Freies Radio Graz</title>
</head>
<body>