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. python之Map函数

    # map()函数使用举例 # 功能:map()接受一个函数f和一个或多个list,将f依次作用在list的每个元素,得到一个新的列表 # 语法:map(方法名,列表,[列表2]) # 注意:map( ...

  2. [Caffe]:关于*** Aborted at 1479432790 (unix time) try "date -d @1479432790" 错误的另一种原因

    问题:设置solver.prototxt时,lr_policy:"step",运行时出现下面问题 *** Aborted at (unix time) try "date ...

  3. asp.net 的三种开发模式

    一, Web Pages 是三种创建 ASP.NET 网站和 Web 应用程序的编程模式中的一种. 其他两种编程模式是 Web Forms 和 MVC(Model View Controller 模型 ...

  4. Directory操作

    操作文件夹 CreateDirectory() 创建新文件夹 Delete() 删除 Move() 剪切 Exists() 判断文件夹是否存在 //获取当前目录下所有文件夹的路径 Directory. ...

  5. BZOJ2213[Poi2011]Difference——DP

    题目描述 A word consisting of lower-case letters of the English alphabet ('a'-'z') is given. We would li ...

  6. Network of Schools POJ - 1236(强连通+缩点)

    题目大意 有N个学校,这些学校之间用一些单向边连接,若学校A连接到学校B(B不一定连接到A),那么给学校A发一套软件,则学校B也可以获得.现给出学校之间的连接关系,求出至少给几个学校分发软件,才能使得 ...

  7. QT 5 安装 vs2017 后,出现找不到 rc.exe 问题

    QT 5 安装 vs2017 后,出现找不到 rc.exe 问题 qt 5 cannot run 'rc.exe' 出现这种错误,是因为,rc.exe  未找到,也就是 SKD 路径不对. 找到相应的 ...

  8. luogu2336 喵星球上的点名 (SA+二分答案+树状数组)

    离散化一下然后把姓名串和询问串都放一起做SA 和bzoj3277串类似地,满足某一询问的后缀(就是和这个询问对应的后缀的LCP>=这个询问长度的后缀)的排名也是一个区间,把这个区间二分出来即可 ...

  9. pip常用命令、配置pip源

    1.查找软件 # pip search Package 2.安装软件 # pip install Package # pip install -r requirements.txt 3.更新软件 # ...

  10. hql和sql练习题

    SQL与HQL练习题 中的所有员工. select * from emp where deptno = 30 from  Emp  e  where e.deptno = 30 2. 列出所有办事员( ...