def render(self, request, *args, **kwargs): thedate = self.get_date(request, *args, **kwargs) tmpl = 'kanisa/public/diary/_this_week_table.html' return render_to_response(tmpl, {'thisweek': get_this_week(thedate)}, context_instance=RequestContext(request))
def render(self, request, *args, **kwargs): thedate = self.get_date(request, *args, **kwargs) tmpl = 'kanisa/public/diary/_this_week_table.html' return render(request, tmpl, {'thisweek': get_this_week(thedate)})
def get_context_data(self, **kwargs): context = super(DiaryIndexView, self).get_context_data(**kwargs) context.update(self.get_diary_context_data()) context['thisweek'] = get_this_week() context['kanisa_title'] = 'What\'s On' categories = EventCategory.objects.filter(num_events__gt=0) context['event_categories'] = categories context['category'] = self.category events = self.get_events() if events is None: context['events_to_display'] = context['events'] else: context['events_to_display'] = events return context