这是项目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),
]下面是报错信息
3 回答
茅侃侃
TA贡献1842条经验 获得超21个赞
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 关注
- 1472 浏览
添加回答
举报
0/150
提交
取消