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().

解决办法:改为下面的写法

from django.contrib.auth.views import login

...

url(r'^login/$', login, name='login'),

...

原因:

django1.10不再支持 url(r'^login/$', 'django.contrib.auth.views.login', name='login'),这种用法;

  ——摘自https://blog.csdn.net/gavinking0110/article/details/53738362

django错误笔记——TypeError: view must be a callable or a list/tuple in the case of include().解决办法的更多相关文章

  1. Django出现的错误1.TypeError: view must be a callable or a list/tuple in the case of include().1.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(). 原因: url(r"^upload ...

  2. Django的urls.py加载静态资源图片,TypeError: view must be a callable or a list/tuple in the case of include().

    Django的urls.py加载静态资源图片,TypeError: view must be a callable or a list/tuple in the case of include(). ...

  3. django 修改urls.py 报错误:TypeError: view must be a callable or a list/tuple in the case of include().

    #coding=utf-8 from django.conf.urls import include,url from django.contrib import admin from blog im ...

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

    原文连接: http://www.imooc.com/qadetail/98920 我是这么写的就好了 from django.conf.urls import url from django.con ...

  5. django报错解决:view must be a callable or a list/tuple in the case of include().

    django版本:1.11.15 django应用,修改urls.py后,访问报错:TypeError at /view must be a callable or a list/tuple in t ...

  6. Django URLs error: view must be a callable or a list/tuple in the case of include()

    Django 1.10 no longer allows you to specify views as a string (e.g. 'myapp.views.home') in your URL ...

  7. 调用日志输出错误:TypeError: 'int' object is not callable等

    *)TypeError: 'int' object is not callable 错误信息: Traceback (most recent call last): File "Visual ...

  8. [Django]我的第一个网页,报错啦~(自己实现过程中遇到问题以及解决办法)

    环境配置: python :2.7.13 django:1.10.5 OS:Win7(64位)& Centos7 问题描述  解决办法   global name 'render' is no ...

  9. Silverlight无法启动调试,错误“Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.” 解决办法

    今天调试Silverlight出现了以下错误: 意思是“无法启动调试,因为Silverlight Developer Runtime没有安装,请安装一个匹配的版本”.但是按Ctrl + F5可以调试运 ...

随机推荐

  1. sql语句中日期相减的操作

    select datediff(year, 开始日期,结束日期); --两日期间隔年select datediff(quarter, 开始日期,结束日期); --两日期间隔季select datedi ...

  2. 在使用ADOQuery删除数据时的处理 [问题点数:100分,结帖人isdxsc]

    在使用ADOQuery删除数据时的,希望在他的事件BeforeDelete进行一些判断,符合要求的进行删除,不符合要求的终止这个删除行为,请问应该用什么语句呢?还有个比较奇怪的现象也一起请教:DBGr ...

  3. rabbitmq线上服务器与项目结合的问题总结

    一.特殊字符需要转义 只需要加个\反斜杠就可以了 二.zk的connectString 在rabbit web页面上登录上去,新增queue就可以了

  4. 如何判断使用的是Lodop还是C-Lodop

    Lodop和C-Lodop混合部署的时候,LodopFuncs.js里面有自动判断当前浏览器使用什么,支持np插件的就会使用Lodop,不支持插件方式的会使用C-Lodop,可以通过预览窗口左上角图标 ...

  5. BZOJ4569 SCOI2016萌萌哒(倍增+并查集)

    一个显然的暴力是用并查集记录哪些位之间是相等的.但是这样需要连nm条边,而实际上至多只有n条边是有用的,冗余过多. 于是考虑优化.使用类似st表的东西,f[i][j]表示i~i+2^j-1与f[i][ ...

  6. rsync同步官方zabbix仓库搭建本地yum源

    1.同步资源 # rsync -vrt rsync://repo.zabbix.com/mirror/zabbix/3.4/rhel/7/x86_64/ /home/mirrors/zabbix/3. ...

  7. VirtualBox中slitaz系统不能联网

    首先,关于VirtualBox虚拟机中安装slitaz操作系统中,先不讲,现在假设电脑中已经装好了VirtualBox,并且已经装好了slitaz操作系统,一个轻量版的linux发行版本. 右上角我画 ...

  8. Android DownloadManager 的使用

    分类: android 技巧2013-05-28 10:32 3278人阅读 评论(1) 收藏 举报   目录(?)[+]   从Android 2.3(API level 9)开始Android用系 ...

  9. linux动态库与静态库混合连接

      1, 在应用程序需要连接外部库的情况下,linux默认对库的连接是使用动态库,在找不到动态库的情况下再选择静态库.使用方式为: gcc test.cpp -L. -ltestlib 如果当前目录有 ...

  10. Ubuntu/Unity中更改窗口修饰键Alt为Super

    在Ubuntu中的Unity桌面环境里,可以使用Alt配合鼠标左键拖动窗口,这一方便的设定有许多不方便的地方.和很多的软件有热键上的冲突,比如Visual Stdio Code的多光标控制功能. 注意 ...