remove traces

This commit is contained in:
Jean-Marie Favreau 2023-11-25 22:21:05 +01:00
parent eb2e44b548
commit 4999b47833
2 changed files with 2 additions and 4 deletions

View File

@ -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=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))) (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") ).order_by("start_day", "start_time")
logger.error(str(len(self.events)) + " events")
for e in self.events: for e in self.events:
for d in daterange(e.start_day, e.end_day): for d in daterange(e.start_day, e.end_day):
logger.error(d)
if d.__str__() in self.calendar_days: if d.__str__() in self.calendar_days:
self.calendar_days[d.__str__()].add_event(e) self.calendar_days[d.__str__()].add_event(e)

View File

@ -137,8 +137,6 @@ class Event(models.Model):
return self.start_day == self.get_consolidated_end_day(intuitive) return self.start_day == self.get_consolidated_end_day(intuitive)
def contains_date(self, d, intuitive=True): 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) return d >= self.start_day and d <= self.get_consolidated_end_day(intuitive)
def get_absolute_url(self): def get_absolute_url(self):