def get_context_data(self, **kwargs): context = super(ClassShow, self).get_context_data(**kwargs) id = self.kwargs['id'] cls = id2cls_func(int(id)) context['classify'] = cls context['the_ids'] = range(10) return context
def get_queryset(self): print self.kwargs id = self.kwargs['id'] cls = id2cls_func(int(id)) object_list = HtmlContent.objects.filter(status=0).filter( classify=cls).filter(~Q(content='')).order_by('-id') return object_list
def get_queryset(self): print self.kwargs id = self.kwargs['id'] cls = id2cls_func(int(id)) object_list = HtmlContent.objects.filter(status=0).filter(classify=cls).filter(~Q(content='')).order_by('-id') return object_list