code: def minicalendar(context):
      
      today = dt.date.today()
      request = context['request']
      home = request.site.root_page
      cal = CalendarPage.objects.live().descendant_of(home).first()
      calUrl = cal.get_url(request) if cal else None
      if cal:
          events = cal._getEventsByWeek(request, today.year, today.month)
      else:
          events = getAllEventsByWeek(request, today.year, today.month)
      return {'request':     request,
              'today':       today,
              'year':        today.year,
              'month':       today.month,
              'calendarUrl': calUrl,
              'monthName':   calendar.month_name[today.month],
              'weekdayInfo': zip(weekday_abbr, weekday_name),
              'events':      events}
docs: Displays a little ajax version of the calendar.