需要在views修改对应的方法 class DetailView(generic.DetailView): template_name='polls/detail.html' model=Questions context_object_name='question' 最后一句必须与html中的一致起来才行
需要在views修改对应的方法 class DetailView(generic.DetailView): template_name='polls/detail.html' model=Questions context_object_name='question' 最后一句必须与html中的一致起来才行