From 4c82869e3a590c982c43958e3e4b0f9fad440678 Mon Sep 17 00:00:00 2001
From: Alban Gruin
Date: Wed, 25 Apr 2018 09:42:24 +0200
Subject: templates: remplacement de dt_prettyprint par date
---
templates/group_list.html | 2 +-
templates/group_weeks_list.html | 2 +-
templatetags/dt_week.py | 7 +------
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/templates/group_list.html b/templates/group_list.html
index bca8c70..d88f144 100644
--- a/templates/group_list.html
+++ b/templates/group_list.html
@@ -6,7 +6,7 @@
{% block lelement %}{{ element }} —
{% for week in element.weeks %}
- {{ week|dt_prettyprint }} {% if not forloop.last %}– {% endif %}
+ {{ week|date:"Y/m/d" }} {% if not forloop.last %}– {% endif %}
{% empty %}
aucun cours dans le mois à venir
{% endfor %}
diff --git a/templates/group_weeks_list.html b/templates/group_weeks_list.html
index c348d5d..baf312e 100644
--- a/templates/group_weeks_list.html
+++ b/templates/group_weeks_list.html
@@ -4,5 +4,5 @@
{% block title %}Semaines du groupe {{ group }} – {% endblock %}
{% block pagetitle %}Semaines du groupe {{ group }}{% endblock %}
{% block url %}{% url "timetable" timetable.year.slug timetable.slug group.slug element.year element|dt_week %}{% endblock %}
-{% block element %}{{ element|dt_prettyprint }} (semaine {{ element|dt_week }}){% endblock %}
+{% block element %}{{ element|date:"Y/m/d" }} (semaine {{ element|dt_week }}){% endblock %}
{% block navigation %}Liste des groupes{% endblock %}
diff --git a/templatetags/dt_week.py b/templatetags/dt_week.py
index de0db08..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
@@ -21,8 +21,3 @@ 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)
--
cgit v1.2.1