You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH

错误信息如下:

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

表单字段action以'/'结尾,(action="/picsave/),尝试修改settings文件,设置了APPEND_SLASH = False属性,

bug仍存在。最后将 应用urls中对应的路径末去掉'/',(r'^picsave/$',去掉表达式中的'/'),bug修复。
PS:仔细了解APP中urls路径配置详细规则

猜你喜欢

转载自blog.csdn.net/MR_L_0927/article/details/79401095