錯誤描述:
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>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/211553.html
標籤:其他
