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

后端 未结 7 2266
北海茫月
北海茫月 2020-12-06 10:36

I am new to django and python. During url mapping to views i am getting following error: TypeError: view must be a callable or a list/tuple in the case of include().

<
7条回答
  •  有刺的猬
    2020-12-06 11:26

    Answer is in project-dir/urls.py

    Including another URLconf
        1. Import the include() function: from django.conf.urls import url, include
        2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
    

提交回复
热议问题