summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico Schmidt <ernesto@helsinki.at>2020-09-15 20:38:14 (GMT)
committerErnesto Rico Schmidt <ernesto@helsinki.at>2020-09-15 20:38:14 (GMT)
commitea287349360f6102369df3bdc8efb64a684a95ca (patch)
tree314e2be9956be51e75a6c0cf9912e89b3375ea2c
parent28d284b9a8500dc249e715e293db78e62b8e2588 (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)