From c9388e29b2f9ee18a9e190683a8a33fb710684c5 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 27 Jan 2018 17:56:45 +0100 Subject: PEP8 --- templatetags/dt_week.py | 2 ++ templatetags/rooms.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'templatetags') diff --git a/templatetags/dt_week.py b/templatetags/dt_week.py index e8d13ac..de0db08 100644 --- a/templatetags/dt_week.py +++ b/templatetags/dt_week.py @@ -17,10 +17,12 @@ 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) -- cgit v1.2.1