标签:from ica pre sha 数据 false type content rom
1.from django.models import model_to_dict list=[] for good in goods: json_data=model_to_dict(good) list.append(json_data) rturn Response(json_dumps(list),content_type="application/json") 2.from django.core import serializers json_data=serializers.serializers("json",goods) return Response(json_data,content_type="application/json") 3.from dajngo.http import jsonresponse from django.core import serializers import json json_data=serializers.serializers("json",goods) json_data=json.loads(json_data) return jsonresponse(json_data,safe=false)
标签:from ica pre sha 数据 false type content rom
原文地址:http://www.cnblogs.com/chennuo/p/7811243.html