TypeError: view must be a callable or a list/tuple in the case of include().解决办法
来源:互联网 发布:淘宝客服搞笑对话段子 编辑:程序博客网 时间:2024/06/07 06:32
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'),
...
问题解决
总结:做软件升级的人能不能在这种容易因为升级而出错的地方多给些提示呢!!!
0 0
- 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 单元测试报错: 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()
- 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 学习---isinstance() arg 2 must be a type or tuple of types
- Uncaught (in promise) TypeError: Super expression must either be null or a function
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- Caused by: android.view.InflateException: You must specifiy a layout in the include tag: <include la
- Caused by: android.view.InflateException: You must specifiy a layout in the include tag: <include la
- must register a nib or a class for the identifier or connect a prototype cell in a storyboard'的解决办法
- TypeError: dist must be a Distribution instance
- The method onClick(View) of type MainActivity must override or implement a supertype method
- The method of type must override or implement a supertype method解决办法
- AutoComplete
- 两个Activity之间传递List<T>数据
- servlet设置编码无效
- [Django]models中定义的choices 字典在页面中显示值
- java系统高并发解决方案
- TypeError: view must be a callable or a list/tuple in the case of include().解决办法
- 碰撞检测算
- 关键字
- Android之Adapter用法总结
- Android6.0源码分析之View(一)
- MFC通过链接打开网页
- dos 通过ip获取局域网电脑mac
- 深入剖析Java中的装箱和拆箱
- 【50.00%】【codeforces 747C】Servers