Django提交时报错

错误描述:

RuntimeError at /saveBlog
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/saveBlog/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
大意是:在POST调用URL时,在URL末尾没有“/”。

解决方法:
在Form的action属性中的url尾加上“/”:
...
<form action='/saveBlog/' method='post'>
...
</form>

上一篇:slash “/” 和 backslash“\”


下一篇:Oracle分析函数FIRST_VALUE、LAST_VALUE