【发布时间】:2019-06-04 00:36:43
【问题描述】:
不知道为什么会出现这个问题。enter image description here 当您阅读一本书并遵循它时,就会发生这些错误。我不知道该怎么办。帮我一把。
源代码
这是我的 fistsite.py 源代码。
拳头.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
enter code here
path('admin/', admin.site.urls),
path('polls/', include('polls.urls')),
]
修改上面的源代码后 现在 fistsite.py
from django.contrib import admin
from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('/polls', views.polls, name='polls'),
path('/admin', views.admin, name='admin')
]
但是出现了错误。enter image description here
【问题讨论】:
-
您输入的网址在服务器上不存在。您甚至可以查看哪些可用。
-
显示你的“fistsite.urls”
-
只需像这样为域 url 添加路径:path('', views.index, name='index')
-
我能看到你提供的网址吗
标签: python html css django server