标签:
1 from django.core import serializers 2 3 @login_required 4 def ajax_get_data(request): 5 json_data = serializers.serialize("json", MyModel.objects.all()) 6 return HttpResponse(json_data,content_type="application/json")
标签:
原文地址:http://www.cnblogs.com/tk091/p/4178160.html