summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico Schmidt <ernesto@helsinki.at>2020-09-15 20:38:14 (GMT)
committerChristian Pointner <equinox@helsinki.at>2020-09-21 15:39:27 (GMT)
commit6882d934ead2d02a72b2e1021ab14df570c1d966 (patch)
treeb19e3f12421e464dd7c7959b84bf121455997cd3
parenta5913f48176214eaf9a5c6a851701e57a2d9609d (diff)
Add exception to to return extended height of the show
-rw-r--r--program/templatetags/timeslots.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/templatetags/timeslots.py b/program/templatetags/timeslots.py
index 9b6712a..e8db9e8 100644
--- a/program/templatetags/timeslots.py
+++ b/program/templatetags/timeslots.py
@@ -8,7 +8,9 @@ register = template.Library()
@register.simple_tag
def height(start, end):
if start.year == 2020 and int(start.strftime('%V')) >= 5 and start.hour == 12 and start.minute == 0:
- return '30'
+ if end.minute == 5:
+ return '30'
+ return '%d' % (((end - start).seconds / 60) + 25)
else:
return '%d' % ((end - start).seconds / 60)