Commit 889ac58c authored by Patrick Kimber's avatar Patrick Kimber

calendar mixin - month count attribute #1181

parent e3f926a3
......@@ -230,9 +230,16 @@ class BookingUpdateView(
class CalendarMixin(object):
def get_month_count(self):
result = self.month_count
except AttributeError:
result = None
return result
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
calendars = HtmlCalendar().get_calendars()
calendars = HtmlCalendar().get_calendars(count=self.get_month_count())
grouped = grouper(calendars, 3)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment