客户端代码:defhttp_post(values):json_data=json.dumps(values)try:req=urllib2.Request(post_server,json_data)#生成页面请求的完整数据response=urllib2.urlopen(req)#发送页面请求excepturllib2.HTTPError,error:print"ERROR:",error.read()Django端代码:defrecv_data(request):ifrequest.method=='POST':received_json_data=json.loads(request.body)returnreceived_json_dataelse:print'abc'程序运行后,client端总是报错:You'reseeingthiserrorbecauseyouhaveDEBUG=TrueinyourDjangosettingsfile.ChangethattoFalse,andDjangowilldisplayastandard500page.请问是什么原因啊?!
添加回答
举报
0/150
提交
取消