Django URL不存在?

时间:2018-06-14 12:31:45

标签: python django

这很奇怪,有什么想法吗?:enter image description here

这是我的urls.py

代码
from django.contrib import admin
from django.conf.urls import include
from django.urls import path

urlpatterns = [
    path('admin/', admin.site.urls),
    path('videos/', include('videos.urls'))
] 

和videos / urls.py:

from django.urls import path
from . import views


urlpatterns = [
    path(r'^$', views.index, name='index'),
]

1 个答案:

答案 0 :(得分:1)

实际上,我修好了!简单的错误。将视频\ urls.py更改为此内容; enter image description here