From 96195f1e813dfab0d002dd3cf33dcac2c95a389b Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 9 Jun 2016 14:31:40 +0200 Subject: [PATCH] ajoute un tag True/False -> Oui/Non --- 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"