python_django_The requested URL /sunck/login/sunck/showmain/ was not found on this server.错误
在我url匹配过程中出现了这样一个错误:
网页显示:
Not Found The requested URL /sunck/login/sunck/showmain/ was not found on this server.
我有点懵b,然后一遍又一遍的检查url的匹配,然后依然找不到错误源头,并且服务器这边也显示:
"POST /sunck/login/sunck/showmain/ HTTP/1.1" 404 101
那俺在想应该是/sunck/login/sunck/showmain/的那个路径错了,最后,发现是我html中form表单中少写了一个“ / ”,坑人啊,
然后俺加上,就好了。。。。俺也是醉勒,这坑遇见了两次,这次一定要记下来!!
# 正确的form路径提交 <form action="/sunck/showmain/" method="post"> # 有坑的form路径提交 <form action="sunck/showmain/" method="post">