django错误笔记——TypeError: view must be a callable or a list/tuple in the case of include().解决办法
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().解决办法的更多相关文章
- 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 ...
- 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(). ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 调用日志输出错误:TypeError: 'int' object is not callable等
*)TypeError: 'int' object is not callable 错误信息: Traceback (most recent call last): File "Visual ...
- [Django]我的第一个网页,报错啦~(自己实现过程中遇到问题以及解决办法)
环境配置: python :2.7.13 django:1.10.5 OS:Win7(64位)& Centos7 问题描述 解决办法 global name 'render' is no ...
- Silverlight无法启动调试,错误“Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.” 解决办法
今天调试Silverlight出现了以下错误: 意思是“无法启动调试,因为Silverlight Developer Runtime没有安装,请安装一个匹配的版本”.但是按Ctrl + F5可以调试运 ...
随机推荐
- Delphi中统一显示表格字段名的高效方法
问题描述:在开发数据库程序时,我们经常要使用很多的表格显示组件DBGrid.当DBGrid显示某表格的数据时,其字段标题默认的就是后台数据库中的表格的字段名称.而为了数据库开发方便,后台数据库中的表格 ...
- BZOJ1304 CQOI2009叶子的染色(树形dp)
令f[i]表示i子树内最少染色次数,加上012状态分别表示该子树内叶节点已均被满足.存在黑色叶节点未被满足.存在白色叶节点未被满足,考虑i节点涂色情况即可转移.事实上贪心也可以. #include&l ...
- BZOJ4942 NOI2017整数(线段树)
首先把每32位压成一个unsigned int(当然只要压起来能过就行).如果不考虑进/退位的话,每次只要将加/减上去的数拆成两部分直接单点修改就好了.那么考虑如何维护进/退位.可以发现进位的过程其实 ...
- Web api dynamic
参考: ajax调用实例 <script> var user = { name_CN: "haha", pwd: "123" ...
- Cuba获取属性文件中的配置
最直接的办法是,使用AppContext.getProperty("cuba.trustedClientPassword"); 可以获取到系统中的web模块下的wep-app.pr ...
- day22 os模块
# 主要用于和当前操作系统做对接的时候获取系统参数用的 import os # os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 # os.chdir("dir ...
- Java8 使用
Java8 使用 链接:https://www.jianshu.com/p/936d97ba0362 链接:https://www.jianshu.com/p/41de7b5ac7b9 本文主要总结了 ...
- iOS 【终极方案】精准获取webView内容高度,自适应高度
前言:是这样的,刚写完上一篇文章还没缓过神来,上一篇文章我还提到了,想和大家聊聊原生+H5如何无缝连接的故事.结果我朋友就给我发了两篇他的作品.他的做法也都有独到之处.好的文章都是这样,让你每次看都能 ...
- 批量导入导出站点权限site permissions
批量导入站点权限 cls $Web = Get-SPWeb "http://16.178.115.14:91/" Get-Content c:\export\account.t ...
- 洛谷 P2158 [SDOI2008]仪仗队 解题报告
P2158 [SDOI2008]仪仗队 题目描述 作为体育委员,C君负责这次运动会仪仗队的训练.仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线 ...