Android + Python(Dja

2023-01-31 python android Dja

问题一:

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.

就是最后"/"的原因。


总结:在模拟器中不找到原因时要尝试换一种简单明了的方式来模拟重现问题场景。


问题二:

Eclipse 提示:replace "..." with ellipsis character (…, &&;#8230;) ?

提示的意思是:用省略号的字符形式(…, &&;#8230;)?替换省略号"..."(这个省略号是由英文状态下输入的三个圆点)

解决方法:

  • 跳到中文输入法下,按shift+^打出省略号

  • 直接将省略号替换为【…】



相关文章