def detail(request,hero_id):
    hero=models.HeroInfo.objects.get(id=hero_id)
    return render_to_response('detail.html',{'detail_obj':hero})

原因为视图获取参数时候   写成了(id,hero_id),改成如上的(id=hero_id)即可解决。

 

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-12-08
  • 2022-01-12
  • 2021-08-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案