python django 提示无法找到路径
闭着眼刷牙 2021-05-04 11:43:41 问题:访问http://127.0.0.1:8000/login/ 提示如下内容
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/login/
Using the URLconf defined in PythonProject.urls, Django tried these URL patterns, in this order:
1. ^media/(?P<path>.*)$
2. ^BookType/
3. ^Book/
4. ^ ^$ [name='index']
5. ^ ^frontLogin$ [name='frontLogin']
6. ^ ^frontLoginout$ [name='frontLoginout']
7. ^ ^login$ [name='login'] #<------按照逻辑应该这行匹配
8. ^ ^loginout$ [name='loginout']
9. ^ ^changePassword$ [name='changePassword']
10.^ ^main$ [name='main']
11.^tinymce/
The current path, login/, didn’t match any of these.
初步分析:访问路径中的login和系统中列出来的7行应该匹配成功,为什么系统报错?