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 import views urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^index/$',views.index),
]
改成这种写法:from blog import views , url 不用双引号,直接views.index
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(). ...
- 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错误笔记——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()
原文连接: 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 ...
- appium 提示报错“TypeError: 'unicode' object is not callable”的解决方式!
这里提到的这个报错,是小错误且容易经常会犯,有时需要特别注意使用. 目的要求结果:根据某个元素的id值获取到对应id的text值,并且将获取的text值与本身存在的text值做比较,查看text值是否 ...
- python import 错误 TypeError: 'module' object is not callable
python import 错误 TypeError: 'module' object is not callable 在这里,有 Person.py test.py; 在 test.py 里面 im ...
- Django之urls.py详解
urls.py:URL分发器(路由配置文件)URL配置(URLconf)就像是Django所支撑网站的目录.它的本质是URL模式以及要为该URL模式调用的视图函数之间的映射表.你就是以这种方式告诉Dj ...
随机推荐
- ios 开发发布证书配置详细流程
iOS证书配置实践 本文参考了: iOS证书配置指南:http://dev.umeng.com/push/ios/license-configuration-guide 写在前面: 团队开发证书的管理 ...
- ssh连接github连不上
连接github报端口22连接不上: 输入命令展示出ssh_config内容后: vim /etc/ssh/ssh_config 或者使用open /etc/ssh/ssh_config命令在文本编辑 ...
- 自定义标签jsp2格式
在写自定义标签时候是不是感觉很烦啊,其实人家也是这样认为的,于是我们的jsp新的标准对标签进行了更改,使我们用起来更简单.到底哪里简单呢?看看代码再说咯: 还是老规矩,先上一个标签的逻辑类: 1. p ...
- HDU 1847 Good Luck in CET-4 Everybody! 四级好运!(博弈)
思路:先用P/N状态来找规律. N状态:1 2 4 6 8 16 P状态:3 5 因为3=1+2, 无论拿1或者2皆输.看看5,只要抽掉2就变成了3,所以是N状态.看看6,可以抽掉1 2 4,若抽1, ...
- java入门第二章——java编程基础
习题 一.填空题 (p)1.java中的程序代码都必须在一个类中定义,类使用(class)关键字来定义. (p)2.布尔常量即布尔类型的两个值,分别是(true)和(false) (p18)3.jav ...
- UVA12897 - Decoding Baby Boos
没必要每次都真的修改一遍字母值,用一个标记表示字母最后的值,最后一遍的时候再进行修改 #include<cstdio> #include<cstring> +; char st ...
- iOS开发笔记--关于 @synchronized,这儿比你想知道的还要多
http://www.cocoachina.com/ios/20151103/14007.html 本文翻译自 Ryan Kaplan 的 More than you want to know abo ...
- Vector 容器简单介绍
# Vector STL简要介绍 关于STL中的vector容器,以下做一些相关介绍. #### vector 简要概述 vector 称作向量类,属于容器类,实现了动态的数组,用于元素数量变化的对象 ...
- python_103_属性方法例子
class Flight(object): def __init__(self,name): self.flight_name = name def checking_status(self): pr ...
- VC++:鼠标的使用
长期改变鼠标形状: SetClassLongPtr(GetSafeHwnd(), GCLP_HCURSOR, (LONG)LoadCursor(NULL, IDC_WAIT));//这个是x64下可以 ...