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')
posted @ 2019-05-15 18:10  Foster_Xu  阅读(1435)  评论(0编辑  收藏  举报