Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 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
Beispiel #4
0
 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