How to use the eventy.utils.EventCalendar function in eventy

To help you get started, we’ve selected a few eventy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github powellc / django-eventy / eventy / utils.py View on Github external
def formatyear(self, year):
        self.year = year
        return super(EventCalendar, self).formatyear(year)
github powellc / django-eventy / eventy / templatetags / eventy_tags.py View on Github external
def show_year(events, date, size="small"):
    year_table = EventCalendar(events, size).formatyear(int(date))
    return {'year_table':year_table }
github powellc / django-eventy / eventy / templatetags / eventy_tags.py View on Github external
def show_month(events, date, size="large"):
    if date == '':
        month_table = EventCalendar(events, size).formatmonth(datetime.now().year, datetime.now().month)
    else:
        month_table = EventCalendar(events, size).formatmonth(date.year, date.month)
    return {'month_table':month_table, 'size':size }
github powellc / django-eventy / eventy / views.py View on Github external
def get_context_data(self, **kwargs):
        context = super(EventListView, self).get_context_data(**kwargs)
        context['month'] = EventCalendar(self.get_queryset()).formatmonth(datetime.now().year, datetime.now().month)
        if self.calendar:
            context['calendar'] = self.calendar
        return context