DJANGO : TypeError: view must be a callable or a list/tuple in the case of include()

i am getting below error in django:

File "C:\Users\USER\Desktop\Python\CarRentalSystem\system\urls.py", line 6, in <module>
    url(r'^$', 'system.views.home', name = "home"),
  File "C:\Users\USER\Desktop\Python\lib\site-packages\django\conf\urls\__init__.py", line 13, in url
    return  re_path(regex, view, kwargs, name)
  File "C:\Users\USER\Desktop\Python\lib\site-packages\django\urls\conf.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().

It should be url(r'^$', system.views.home, name = "home") on line 6 of system/urls.py (with import of system before). url does not resolve string (dotted path) to actual object.

You're probably dealing with very old project: this feature was deprecated and then removed in Django 1.10 (7 years ago; most recent version is now Django 4.0): changelog.

Back to Top