android客户端 + python服务端(django框架)---问题集锦
1:很奇怪的事,Get和Post提交方式
各种方法试尽了,始终不成功,结果是URL问题,
http://xxxx/xxxxx实在没有办法只好直接上html:
<html> <head>test</head> <body> <form action="http://xxxx/xxxxx" method="post"> <input type=text name='username' /> <input type="submit" value='submit'/> </form> </body> </html>
终于露出了能看到的原因:
You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to xxxx/xxxx/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
就是最后"/"的原因。
总结:在模拟器中不找到原因时要尝试换一种简单明了的方式来模拟重现问题场景。