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/$'中的/,问题解决了。
版权声明
本文章由作者“衡于墨”创作,转载请注明出处,未经允许禁止用于商业用途
发布时间:2018年08月08日 10:36:04
备案号:
闽ICP备19015193号-1
关闭特效
评论区#
还没有评论哦,期待您的评论!
引用发言