TypeError: view must be a callable or a list/tuple in the case of include() in Django
Posted: 15 Sep 2019
I am getting error in django 2.2. when i define views of app in url.py then it shows error like this.
TypeError: view must be a callable or a list/tuple in the case of include().
My "urls.py" is like this:
and "views.py" is like this
Please help to resolve this
TypeError: view must be a callable or a list/tuple in the case of include().
My "urls.py" is like this:
Code: Select all
from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^hello/', 'myapp.views.hello1', name = 'hello1'),
]
Code: Select all
from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^hello/', 'myapp.views.hello1', name = 'hello1'),
]