From 4999b47833bb83ee434ef325e025affa23475a44 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 25 Nov 2023 22:21:05 +0100 Subject: [PATCH] remove traces --- src/agenda_culturel/calendar.py | 4 ++-- src/agenda_culturel/models.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/agenda_culturel/calendar.py b/src/agenda_culturel/calendar.py index b469a0f..257818d 100644 --- a/src/agenda_culturel/calendar.py +++ b/src/agenda_culturel/calendar.py @@ -92,10 +92,10 @@ class CalendarList: (Q(end_day__isnull=True) & Q(start_day__gte=self.c_firstdate) & Q(start_day__lte=self.c_lastdate)) | (Q(end_day__isnull=False) & ~(Q(start_day__gt=self.c_lastdate) | Q(end_day__lt=self.c_firstdate))) ).order_by("start_day", "start_time") - logger.error(str(len(self.events)) + " events") + for e in self.events: for d in daterange(e.start_day, e.end_day): - logger.error(d) + if d.__str__() in self.calendar_days: self.calendar_days[d.__str__()].add_event(e) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index b479ae6..f28a932 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -137,8 +137,6 @@ class Event(models.Model): return self.start_day == self.get_consolidated_end_day(intuitive) def contains_date(self, d, intuitive=True): - logger.error("et toc") - #logger.error(str(d) + " " + str(self.start_day) + " " + str(self.get_consolidated_end_day(intuitive))) return d >= self.start_day and d <= self.get_consolidated_end_day(intuitive) def get_absolute_url(self):