我的 URL.py 文件中有以下语句
(r'^confirm/(\d+)/$', confirm)
但是这个网址
http://127.0.0.1:8000/confirm/DMo32zPB15
返回这个
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/confirm/DMo32zPB15
Using the URLconf defined in BBN.urls, Django tried these URL patterns, in this order:
^login/$
^ajax/login$
^ajax/login/nact/$
^ajax/login/nact/cancel//$
^ajax/login/nact/resend/$
^confirm/(\d+)/$
The current URL, confirm/DMo32zPB15, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file Change that to False, and Django will display a standard 404 page.
为什么它不能识别 URL?