欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Django报:AttributeError: tuple object has no attribute get

程序员文章站 2022-05-27 11:51:46
...
def index(request):
    hero_list=models.HeroInfo.objects.all()
    return render_to_response('index.html',{'hero_list':hero_list})

视图方法RS,少了return就会报这个错,可以通过,对models的方法的对象一一检查。