From 7cd015dce88c214c2b22792d2a5ba9296d824c9a Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:41:37 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20tag=20qui=20transforme=20un=20bo?= =?UTF-8?q?ol=C3=A9en=20(True/False)=20en=20son=20=C3=A9quivalent=20fran?= =?UTF-8?q?=C3=A7ais=20(Oui/Non)=20pour=20plus=20de=20lisibilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestioncof/templatetags/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gestioncof/templatetags/utils.py b/gestioncof/templatetags/utils.py index 9c439dd3..5f90722e 100644 --- a/gestioncof/templatetags/utils.py +++ b/gestioncof/templatetags/utils.py @@ -34,3 +34,10 @@ def highlight_clipper(clipper, q): else: text = clipper.username return highlight_text(text, q) + +@register.filter +def oui_ou_non(b): + if b: + return "Oui" + else: + return "Non"