diff options
author | Ernesto Rico Schmidt <ernesto@helsinki.at> | 2020-09-15 20:38:14 (GMT) |
---|---|---|
committer | Ernesto Rico Schmidt <ernesto@helsinki.at> | 2020-09-15 20:38:14 (GMT) |
commit | ea287349360f6102369df3bdc8efb64a684a95ca (patch) | |
tree | 314e2be9956be51e75a6c0cf9912e89b3375ea2c /program/templatetags | |
parent | 28d284b9a8500dc249e715e293db78e62b8e2588 (diff) |
Add exception to to return extended height of the show
Diffstat (limited to 'program/templatetags')
-rw-r--r-- | program/templatetags/timeslots.py | 4 |
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) |