小编Bra*_*don的帖子

Django 404错误页面未找到...当前路径与最后一个路径匹配

我是 django 的新手,我正在尝试我自己的民意调查教程的变体。我的应用程序运行良好,每个页面都正确加载。然后我做了一个改变;我创建然后删除了一个模型。现在,许多网址似乎已损坏。我不明白这个错误:

\n
Page not found (404)\nRequest Method: GET\nRequest URL:    http://127.0.0.1:8000/polls/1/pick/\nRaised by:  polls.views.pick\nUsing the URLconf defined in mySite.urls, Django tried these URL patterns, in this order:\n\npolls/ [name='index']\npolls/ <int:pk>/ [name='detail']\npolls/ <int:pk>/results/ [name='results']\npolls/ <int:question_id>/vote/ [name='vote']\npolls/ <int:question_id>/tally/ [name='tally']\npolls/ <int:question_id>/pick/ [name='pick']\nThe current path, polls/1/pick/, matched the last one.\n\nYou\xe2\x80\x99re 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.\n
Run Code Online (Sandbox Code Playgroud)\n

所以我不明白为什么它说:当前路径 polls/1/pick/ 与最后一个匹配。

\n

并且还找不到页面?这是如何运作的?当应用程序以前运行良好时,可能是什么导致了这种情况?

\n

我的网址.py: …

django http-status-code-404

3
推荐指数
1
解决办法
5403
查看次数

标签 统计

django ×1

http-status-code-404 ×1