使用Django框架在返回JsonResponse时,遇到报错信息:
In order to allow non-dict objects to be serialized set the safe parameter to False
在JsonResponse()添加safe=False属性即可
return JsonResponse(list,safe=False)
使用Django框架在返回JsonResponse时,遇到报错信息:
In order to allow non-dict objects to be serialized set the safe parameter to False
在JsonResponse()添加safe=False属性即可
return JsonResponse(list,safe=False)