這是項(xiàng)目blog里面的url.pyfrom django.urls import pathfrom . import views
urlpatterns = [ path('', views.index, name="index"),
]這是根目錄里面的url.pyfrom django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('blog/', include('blog.urls')),
path('admin/', admin.site.urls),
]下面是報(bào)錯(cuò)信息
3 回答

茅侃侃
TA貢獻(xiàn)1842條經(jīng)驗(yàn) 獲得超22個(gè)贊
from django.contrib import admin
from django.urls import include, path
maybe the path should be:
from django.conf.urls import include,url
have a try, Good luck.
- 3 回答
- 0 關(guān)注
- 1556 瀏覽
添加回答
舉報(bào)
0/150
提交
取消