0
我只是成功地导入了通用视图,当我想要在视图中使用它们时,问题出现了,服务器只是给出了一个指向“。”的错误。 (期间)在generic.ListView ... 这是我目前正在处理的代码。Django通用视图用法错误
def IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'question_list'
def get_qureyset(self):
return Question.objects.order_by('-published_date')[:5]