from djangoconfurls import pathImportError cannot import name path from djangoconfurls usrlocallibpython39site-packagesdjangoconfurls__init__py
This error occurs when the path function is not found in the django.conf.urls module. This function was introduced in Django version 2.0. If you are using an older version of Django, you can use the url function instead.
To fix this error, you can either upgrade your Django version to 2.0 or later or use the url function instead of path. Here's an example:
from django.conf.urls import url
urlpatterns = [
url(r'^hello/$', views.hello_world),
]
This defines a URL pattern that maps the URL /hello/ to the hello_world view. Note that the regular expression pattern is enclosed in r'' to indicate a raw string
原文地址: https://www.cveoy.top/t/topic/fRLk 著作权归作者所有。请勿转载和采集!