Reimplemented calendar mostly working

Multi day alignment puzzle is pretty hard...
This commit is contained in:
2022-11-21 22:40:33 +00:00
parent bede8b4176
commit 04ec728972
6 changed files with 75 additions and 58 deletions

View File

@@ -47,7 +47,6 @@ class WebCalendar(generic.ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# use today's date for the calendar
d = utils.get_date(self.request.GET.get('month', None))
context['prev_month'] = utils.prev_month(d)
@@ -59,6 +58,7 @@ class WebCalendar(generic.ListView):
# Call the formatmonth method, which returns our calendar as a table
html_cal = cal.formatmonth(withyear=True)
context['calendar'] = mark_safe(html_cal)
context['page_title'] = d.strftime("%B %Y")
return context