小编zee*_*er0的帖子

空路径与以下任何一个都不匹配:

我正在使用 python 3.8,启动服务器时出现错误:

Page not found (404)
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Using the URLconf defined in djangoProject.urls, Django tried these URL patterns, in this order:

polls/
admin/
The empty path 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.
Run Code Online (Sandbox Code Playgroud)

我的民意调查/urls.py:

   from django.urls import path

from . import views

urlpatterns = [
    path('', views.index, name='index'),
] …
Run Code Online (Sandbox Code Playgroud)

python django django-models python-3.x

4
推荐指数
1
解决办法
7308
查看次数

标签 统计

django ×1

django-models ×1

python ×1

python-3.x ×1