最近在做的一个项目需要python做服务端,我一个数据分析的来写后端了,哈哈,这是要发展为全栈了吗。那就全栈吧,~~
首先呢,我是这样写的:
Django端接收:
def cipin_statistics(request):
result = request.POST
print(result)
return HttpResponse('{"status":"'+status+'","code":"2","result":[' + str(result) + ']}')
脚本请求
paramsquery = {
"data":{
"file":"D:/python_project/project_hesc/myapp/test.txt",
"text":""
},
"rule":{
"file":"D:/python_project/project_hesc/myapp/adress.txt",
"text":""