sounds_monitor can matches diffusion by time -- based on local timezone

This commit is contained in:
bkfox
2017-08-31 16:07:45 +02:00
parent 81318e5bd8
commit 28dab0185a
4 changed files with 74 additions and 35 deletions

View File

@ -105,14 +105,18 @@ class DiffusionAdmin(admin.ModelAdmin):
return obj.conflicts.count()
return ''
def end_time(self, obj):
return obj.end.strftime('%H:%M')
end_time.short_description = _('end')
def start_date(self, obj):
return obj.local_date.strftime('%Y/%m/%d %H:%M')
start_date.short_description = _('start')
def end_date(self, obj):
return obj.local_end.strftime('%H:%M')
end_date.short_description = _('end')
def first(self, obj):
return obj.initial.start if obj.initial else ''
list_display = ('id', 'program', 'start', 'end_time', 'type', 'first', 'archives', 'conflicts_')
list_display = ('id', 'program', 'start_date', 'end_date', 'type', 'first', 'archives', 'conflicts_')
list_filter = ('type', 'start', 'program')
list_editable = ('type',)
ordering = ('-start', 'id')