summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-05-01 13:46:50 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-05-01 13:46:50 (GMT)
commit36dffe4825bbf34435785aabdee67101cef725c4 (patch)
tree8899132fa76241ef280766fc91cca3cb0ae04ae4
parent0386ab3ed2ea15385adab932c93f87f28464de1e (diff)
minor cosmetics.
-rw-r--r--program/views.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/program/views.py b/program/views.py
index 09e08b0..eaba951 100644
--- a/program/views.py
+++ b/program/views.py
@@ -198,12 +198,20 @@ def json_day_schedule(request, year=None, month=None, day=None):
timeslots = TimeSlot.objects.get_24h_timeslots(today)
schedule = []
for ts in timeslots:
- entry = { 'start': ts.start.strftime('%Y-%m-%d_%H:%M:%S'), 'end': ts.end.strftime('%Y-%m-%d_%H:%M:%S'), 'title': ts.programslot.show.name, 'id': ts.programslot.show.id, 'automation-id': -1 }
+ entry = {
+ 'start': ts.start.strftime('%Y-%m-%d_%H:%M:%S'),
+ 'end': ts.end.strftime('%Y-%m-%d_%H:%M:%S'),
+ 'title': ts.programslot.show.name,
+ 'id': ts.programslot.show.id,
+ 'automation-id': -1
+ }
+
if ts.programslot.automation_id:
entry['automation-id'] = ts.programslot.automation_id
elif ts.programslot.show.automation_id:
entry['automation-id'] = ts.programslot.show.automation_id
- schedule.append(entry)
+ schedule.append(entry)
- return HttpResponse(json.dumps(schedule, ensure_ascii=False, encoding='utf8').encode('utf8'), content_type="application/json; charset=utf-8")
+ return HttpResponse(json.dumps(schedule, ensure_ascii=False, encoding='utf8').encode('utf8'),
+ content_type="application/json; charset=utf-8")