django分页查询并返回jsons数据
contacts=paginator.page(currentPage)
json_data=serializers.serialize("json",contacts,ensure_ascii=False)
return HttpResponse(json_data,content_type='application/json;charset=utf-8')
Just follow your heart
contacts=paginator.page(currentPage)
json_data=serializers.serialize("json",contacts,ensure_ascii=False)
return HttpResponse(json_data,content_type='application/json;charset=utf-8')