def donateData(request): ''' 返回捐赠信息 捐赠笔数 捐赠总金额 ''' data = [Donate.totalDonateNums(), int(Donate.totalDonateMoney())] return JsonResponse({'data': data})
def donateData(request): ''' 返回捐赠信息 捐赠笔数 捐赠总金额 ''' data = [Donate.totalDonateNums(), int(Donate.totalDonateMoney())] result = json.dumps(data, ensure_ascii=False) return HttpResponse(result, content_type='application/json')