From 851102a86d354af0396d47e42c563af0ebd94e7a Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Tue, 12 Dec 2023 20:02:24 +0100 Subject: [PATCH] le badge accorde au singulier ou pluriel suivant nb_drafts --- src/agenda_culturel/templatetags/event_extra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agenda_culturel/templatetags/event_extra.py b/src/agenda_culturel/templatetags/event_extra.py index 66cb0d9..c28eff8 100644 --- a/src/agenda_culturel/templatetags/event_extra.py +++ b/src/agenda_culturel/templatetags/event_extra.py @@ -1,6 +1,7 @@ from django import template from django.utils.safestring import mark_safe from django.urls import reverse_lazy +from django.template.defaultfilters import pluralize from agenda_culturel.models import Event @@ -43,7 +44,6 @@ def show_badges_events(): # TODO: seulement ceux dans le futur ? nb_drafts = nb_draft_events() if nb_drafts != 0: - return mark_safe('' + str(nb_drafts) + '') - + return mark_safe('' + str(nb_drafts) + '') else: return "" \ No newline at end of file