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可以调试运 ...
随机推荐
- 设计模式笔记:适配器模式(Adapter)
1. 适配器模式简介 1.1 模式定义 适配器模式:通过一个类的接口转换成客户希望的另外一个接口,使原本由于接口不兼容而不能一起工作的那些类可以一起工作. 适配器从结构上分为:类适配器和对象适配器.其 ...
- html DOM 方法和屬性
html利用javascript對節點執行動作: 每一個節點是一個節點對象,對節點的動作是通過方法和屬性接口實現的: 方法:就是執行的動作: 屬性就是節點的屬性(包括設置和獲取): 常見方法和作用: ...
- Bootstrap手风琴效果
前面的话 Bootstrap 框架中 Collapse插件(折叠)其实就是我们常见的手风琴效果.当单击一个触发元素时,在另外一个可折叠区域进行显示或隐藏,再次单击时可以反转显示状态.经典的场景是多个折 ...
- BZOJ3207花神的嘲讽计划Ⅰ——主席树+hash
题目描述 背景 花神是神,一大癖好就是嘲讽大J,举例如下: “哎你傻不傻的![hqz:大笨J]” “这道题又被J屎过了!!” “J这程序怎么跑这么快!J要逆袭了!” …… 描述 这一天DJ在给吾等众蒟 ...
- MT【89】三棱锥的体积公式
评:已知对棱的距离以及此对棱边长,夹角就可以求出该三棱锥的体积.这把三棱锥的放到平行六面体里的做法是非常常见的.
- MT【73】求函数表达式
评:由关系式求表达式最经典的莫过于已知$f(x+y)=f(x)f(y)$利用柯西法求得 $f(x)=[f(1)]^x$
- UOJ #164. 【清华集训2015】V | 线段树
题目链接 UOJ #164 题解 首先,这道题有三种询问:区间加.区间减(减完对\(0\)取\(\max\)).区间修改. 可以用一种标记来表示--标记\((a, b)\)表示把原来的值加上\(a\) ...
- for循环实例
for循环“池理解”[root@localhost ~]# vi showday.sh#!/bin/bashfor TM in "Morning" "Noon" ...
- window.open打开页面居中显示
<script type="text/javascript"> function openwindow(url,name,iWidth,iHeight) { var u ...
- Codeforces Round #525 (Div. 2) Solution
A. Ehab and another construction problem Water. #include <bits/stdc++.h> using namespace std; ...