我得到以下django错误:
File "C:UsersUSERDesktopPythonCarRentalSystemsystemurls.py", line 6, in <module>
url(r'^$', 'system.views.home', name = "home"),
File "C:UsersUSERDesktopPythonlibsite-packagesdjangoconfurls__init__.py", line 13, in url
return re_path(regex, view, kwargs, name)
File "C:UsersUSERDesktopPythonlibsite-packagesdjangourlsconf.py", line 73, in _path
raise TypeError('view must be a callable or a list/tuple in the case of include().')
TypeError: view must be a callable or a list/tuple in the case of include().
system/urls.py
的第6行应该是url(r'^$', system.views.home, name = "home")
(之前已经导入了system
)。url
不解析字符串(虚线路径)到实际对象
你可能正在处理very旧项目:该特性在Django 1.10中被弃用并被删除(7年前;最新版本是Django 4.0): changelog.