Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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

Your code is

urlpatterns = [
    url(r'^$', 'myapp.views.home'),
    url(r'^contact/$', 'myapp.views.contact'),
    url(r'^login/$', 'django.contrib.auth.views.login'),
]
change it to following as you're importing include() function :

urlpatterns = [
    url(r'^$', views.home),
    url(r'^contact/$', views.contact),
    url(r'^login/$', views.login),
]
Comment

PREVIOUS NEXT
Code Example
Python :: first n prime number finder in python 
Python :: arch python 
Python :: how to create a variable that represents any integer in python 
Python :: how to create a matrix from list in python 
Python :: flask set mime type 
Python :: "scrapy shell" pass cookies to fetch 
Python :: number pattern program in python using for loop 
Python :: python loop function 
Python :: python 3.2 release date 
Python :: smma python 
Python :: c is better than python 
Python :: python << meaning 
Python :: print something after sec python 
Python :: how to make a ip tracker in python 
Python :: Checking Availability of user inputted File name 
Python :: python enforcing class variables in subclass 
Python :: how to push the element to array in python 
Python :: run shell script to yaml file 
Shell :: kill localhost 3000 ubuntu 
Shell :: how to install cv2 
Shell :: set default branch to main on git init 
Shell :: test internet speed terminal linux 
Shell :: purge from terminal 
Shell :: kill a port process in ubuntu 
Shell :: How to restart Ubuntu via SSH? 
Shell :: pip check for updates 
Shell :: install maven in ubuntu 
Shell :: yarn install ubuntu 
Shell :: fork bomb 
Shell :: how to check battery health of laptop in cmd 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =