diff options
author | Alban Gruin | 2018-04-25 21:26:03 +0200 |
---|---|---|
committer | Alban Gruin | 2018-04-25 21:26:03 +0200 |
commit | 54c5dbb98293acea9b470808e5a35e99c004f265 (patch) | |
tree | 7fb350d07e2f2a4d687b00fd034e638bd02f8526 /templatetags | |
parent | 772caa72ce7f80bfeb5fbb1d05b57838dafd48c3 (diff) | |
parent | 5488a93bf2e04d2f19e287186011dcbb436a238b (diff) |
Merge branch 'stable/0.13.z' into prod/pa1ch/0.y.z
Diffstat (limited to 'templatetags')
-rw-r--r-- | templatetags/dt_week.py | 7 | ||||
-rw-r--r-- | templatetags/rooms.py | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/templatetags/dt_week.py b/templatetags/dt_week.py index e8d13ac..2d27481 100644 --- a/templatetags/dt_week.py +++ b/templatetags/dt_week.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Alban Gruin +# Copyright (C) 2017-2018 Alban Gruin # # celcatsanitizer is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published @@ -17,10 +17,7 @@ from django import template register = template.Library() + @register.filter def dt_week(dt): return dt.isocalendar()[1] - -@register.filter -def dt_prettyprint(dt): - return "{0}/{1:02d}/{2:02d}".format(dt.year, dt.month, dt.day) diff --git a/templatetags/rooms.py b/templatetags/rooms.py index 5108c92..f0e1b2e 100644 --- a/templatetags/rooms.py +++ b/templatetags/rooms.py @@ -17,10 +17,12 @@ from django import template register = template.Library() + @register.filter def format_rooms(rooms): amphi_list = [room.name for room in rooms if room.name.startswith("Amphi")] - room_list = [room.name for room in rooms if not room.name.startswith("Amphi")] + room_list = [room.name for room in rooms + if not room.name.startswith("Amphi")] amphis = ", ".join(amphi_list) joined = ", ".join(room_list) |