From c87f9a6cec9a855972c8cdd0841e444bf2cfbef2 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Sun, 12 Jun 2016 18:02:47 +0200 Subject: don't include the ID in the show detail page 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 @@ - Sendung: {{ timeslot }} — Radio Helsinki - Freies Radio Graz + Sendung: {{ timeslot.show.name }} — Radio Helsinki - Freies Radio Graz -- cgit v0.10.2 From b18d1c7c5ad1f8e2c68c970a88b2be15124ed8d0 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Sun, 12 Jun 2016 18:19:35 +0200 Subject: show only name in the admin program slots. diff --git a/program/admin.py b/program/admin.py index 91ac63d..cffb65e 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,10 @@ 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' + class ProgramSlotInline(admin.TabularInline): model = ProgramSlot -- cgit v0.10.2 From 43889586f9d4be5939b45cd0360081642f5aebb6 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Sun, 12 Jun 2016 18:23:28 +0200 Subject: added short_description to list header of program slots. diff --git a/program/admin.py b/program/admin.py index cffb65e..665ece2 100644 --- a/program/admin.py +++ b/program/admin.py @@ -85,6 +85,7 @@ class ProgramSlotAdmin(admin.ModelAdmin): 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): -- cgit v0.10.2