Django报:AttributeError: tuple object has no attribute get

def index(request):
    hero_list=models.HeroInfo.objects.all()
    return render_to_response('index.html',{'hero_list':hero_list})

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

原文地址:https://www.cnblogs.com/phyger/p/8048101.html