TypeError: view must be a callable or a list/tuple in the case of include().解决办法
2019-07-01 20:40
661 查看
1、django增加用户认证模块时,总是提醒模块的url.py中 url(r'^login/$', 'django.contrib.auth.views.login', name='login'),出错:
TypeError: view must be a callable or a list/tuple in the case of include().
2、折腾了很多种办法,找了很多原因,最后找到了症结所在:django1.10不再支持 url(r'^login/$', 'django.contrib.auth.views.login', name='login'),这种用法;
3、把上面的语句改为:
from django.contrib.auth.views import login
...
url(r'^login/$', login, name='login'),
---------------------
作者:gavinking0110
来源:CSDN
原文:https://blog.csdn.net/gavinking0110/article/details/53738362
版权声明:本文为博主原创文章,转载请附上博文链接!
相关文章推荐
- 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()
- 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().
- TypeError: view must be a callable or a list/tuple in the case of include()
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- django 单元测试报错: view must be a callable or a list/tuple in the case of include().
- python django1.10解决view must be a callable list/tuple in case of include()
- python错误: TypeError: the JSON object must be str, bytes or bytearray, not 'dict'解决办法
- 【python tip】TypeError: list indices must be integers or slices, not tuple解决
- error: (-5) in the case of classification problem the responses must be cate
- 快速解决Python问题:TypeError: list indices must be integers or slices, not str
- OpenCV(4.1.0) Error: Bad argument (in the case of classification problem the responses must be .....
- error -5008: intel64 or amd64 must be specified in the template of the summary
- Pymongo: TypeError: if no direction is specified, key_or_list must be an instance of list
- 报错信息 The jsp:param action must not be used outside the jsp:include, jsp:forward, or jsp:params elements 的原因及解决办法
- 报错信息 The jsp:param action must not be used outside the jsp:include, jsp:forward, or jsp:params elements 的原因及解决办法
- Spring中出现的he hierarchy of the type ** is inconsistent问题解决办法
- TypeError: list indices must be integers or slices, not tuple