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. Delphi通过查找字符定位TADOQuery数据的位置

    通过TADOQuery的方法Locate,输入字符,查找到定位到对应的数据位置,优点快速定位,缺点是只匹配查找到的和第一个位置,无法连续定位下一个! //定位qrymembertype.Locate( ...

  2. CSS兼容性详解

    前面的话 对于前端工程师来说,不想面对又不得不面对的一个问题就是兼容性.在几年之前,处理兼容性,一般地就是处理IE低版本浏览器的兼容性.而近几年,随着移动端的发展,工程师也需要注意手机兼容性了.本文将 ...

  3. C++拷贝构造函数与 = 重载

    调用拷贝构造函数进行初始化的时候,是不会调用=重载的. // test.cpp : 定义控制台应用程序的入口点. // //#include "stdafx.h" #include ...

  4. BZOJ2135 刷题计划(贪心+二分)

    相邻数作差后容易转化成将这些数最多再切m刀能获得的最小偏差值.大胆猜想化一波式子可以发现将一个数平均分是最优的.并且划分次数越多能获得的偏差值增量越小.那么就可以贪心了:将所有差扔进堆里,每次取出增量 ...

  5. Java原子类实现原理分析

    在谈谈java中的volatile一文中,我们提到过并发包中的原子类可以解决类似num++这样的复合类操作的原子性问题,相比锁机制,使用原子类更精巧轻量,性能开销更小,本章就一起来分析下原子类的实现机 ...

  6. 值得Python小白学习的书 简单推荐几本吧

    于我个人而言,我很喜欢Python,当然我也有很多的理由推荐你去学python.我只说两点.一是简单,二是写python薪资高.我觉得这俩理由就够了,对不对.买本书,装上pycharm,把书上面的例子 ...

  7. docker安装Zabbix

    1. 先安装数据库mysqldocker run --name zabbix-mysql-server --hostname zabbix-mysql-server \-e MYSQL_ROOT_PA ...

  8. 压缩和解压缩文件tar, tar.gz and tar.bz2

    1, 对于tar.gz 压缩:tar -zcvf archive-name.tar.gz directory-name 解压:tar -zxvf prog-1-jan-2005.tar.gz -C / ...

  9. bzoj2870最长道路tree——边分治

    简化版描述: 给定一棵N个点的树,求树上一条链使得链的长度乘链上所有点中的最小权值所得的积最大. 其中链长度定义为链上点的个数.   有几个不同的做法: 1.sort+并查集+树的直径.边从大到小加入 ...

  10. Python基础-简介一

    一.Python介绍 1. Python的应用领域及流行程度 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间, ...