diff --git a/cal/views.py b/cal/views.py index d0734a2..00269ef 100644 --- a/cal/views.py +++ b/cal/views.py @@ -43,14 +43,17 @@ def formatday(self, day, weekday): .exclude(startDate__gt=next_day) .exclude(endDate__lt=this_day, endDate__isnull=False) .exclude(endDate__isnull=True, startDate__lt=this_day)): + start_day = event.startDate.date() + end_day = (event.endDate or event.startDate).date() + body.append('
  • ') if self.admin: body.append(u'✏️' % event.get_absolute_url()) body.append('' % event.wikiPage) - if (this_day == event.startDate.date()): + if this_day == start_day: body.append('' + event.startDate.strftime('%H:%M') + '') body.append('' + esc(event.name) + '') - if (event.endDate) and (event.startDate.date() != event.endDate.date()) and (this_day == event.endDate.date()): + if start_day != end_day and this_day == end_day: body.append(' ' + event.endDate.strftime('%H:%M') + '') body.append('' + esc(event.location) + '') body.append('')