def get_context_data(self, **kwargs): context = super(RecipeListAllView, self).get_context_data(**kwargs) context['alltags'] = RecipeTag.objects.values_list('name', flat=True) context['limits'] = get_nutrition_limits( self.get_queryset()) #FIXME: Too CPU intensive? context['listtype'] = 'all' return context
def get_context_data(self, **kwargs): context = super(RecipeListByTagView, self).get_context_data(**kwargs) context['alltags'] = RecipeTag.objects.values_list('name', flat=True) context['limits'] = get_nutrition_limits(self.get_queryset()) context['tag'] = self.tag return context