Django中关于form中url的填写(post方法与get方法的区别)

        在填写form表单中的action属性的url时,如果是post请求,那么必须要在尾部加上"/",且必须以"/"开头,如果尾部不加"/",则会出现如下异常:

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:8888/system/user/res/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容