TypeError: view must be a callable or a list/tuple in the case of include()
来源:互联网 发布:python键值对 编辑:程序博客网 时间:2024/05/17 20:31
Django 1.10之后的版本中,不在使用导入式的写法。直接写类方法即可
1.10以下版本:
urlpatterns = [ url(r'^login/$', 'django.contrib.auth.views.login', name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'), url(r'^logout-then-login/$', 'django.contrib.auth.views.logout_then_login', name='logout_then_login'),]
1.10及1.11
urlpatterns = [ url(r'^login/$', django.contrib.auth.views.login, name='login'), url(r'^logout/$', django.contrib.auth.views.logout, name='logout'), url(r'^logout-then-login/$', django.contrib.auth.views.logout_then_login, name='logout_then_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
- TypeError: dist must be a Distribution instance
- The method onClick(View) of type MainActivity must override or implement a supertype method
- Main application must be in the list of application paths
- Parameter must be a descendant of this view 错误
- linux core dump 文件 gdb分析
- PHP 设计模式之策略模式
- 模拟实现mymcpy,memmove,strncpy
- Java IO流学习总结
- 备忘录模式,拍电影
- TypeError: view must be a callable or a list/tuple in the case of include()
- SpringMVC的理解
- gdb调试命令
- JSP中九大内置对象概括
- 监督学习一 决策树
- 朱刘模版
- es集群web管理工具cerebro
- JavaScript中的基本类型值和引用类型值区别
- webservice的理解