How do I use the django2 version of include?

this is the url.py in the project blog

from django.urls import path
from . import views
urlpatterns = [
    path("", views.index, name="index"),
]

this is the url.py in the root directory

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path("blog/", include("blog.urls")),
    path("admin/", admin.site.urls),
]

the following is the error message

Mar.02,2021
The usage of

is right. I guess you forgot to modify INSTALLED_APPS


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.


check to see if you have added your own app to INSTALLED_APPS


change the name of the blog folder under url.py to urls.py

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaeee1-2217.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaeee1-2217.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?