search.png
关于我
menu.png
You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set.

今天写django时遇到了一个问题,报错:

RuntimeError: 
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 localhost:8000/wx_basic_data/ (note the trailing slash), 
or set APPEND_SLASH=False in your Django settings.

尝试把settings.py的文件加上APPEND_SLASH=False,问题没有解决,
还是报错:
Not Found: /wx_basic_data
猜测可能是urls.py出了问题,去掉r'^wx_basic_data/$'中的/,问题解决了。

版权声明

知识共享许可协议 本文章由作者“衡于墨”创作,转载请注明出处,未经允许禁止用于商业用途

本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。
发布时间:2018年08月08日 10:36:04

评论区#

还没有评论哦,期待您的评论!

关闭特效