Django做input表单提交报错,错误信息如下
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 192.168.169.2/logo/upload/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
错误处理
修改 urls路由,去除尾部的“/”
原: url(r’^logo/upload/′,configviews.upload)修改后:url(r′logo/upload',configviews.upload)
修改后:url(r'^logo/upload′,configviews.upload)修改后:url(r′logo/upload’,configviews.upload)