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.contrib import admin
from blogapp import views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'helloworld',views.hello)
]
django 1.10版本改了写法了。首先要在引入view模块,其次后面URL设置里views.hello不要加引号了。
在本文中,django-admin.py startproject blogapp
views.py在目录 ~/blogapp/blogapp下
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错误笔记——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'),出错: ...
- 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().
#coding=utf-8 from django.conf.urls import include,url from django.contrib import admin from blog im ...
- 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 ...
- python Flask :TypeError: 'dict' object is not callable
flask 基于Werkzeug .. @moudule.route('/upload', methods=['GET', 'POST']) def upload_file(): global _fl ...
- TypeError: 'module' object is not callable cp fromhttp://blog.csdn.net/huang9012/article/details/17417133
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name ...
- TypeError: 'QueryDict' object is not callable
id = int(request.POST('id')) Error message: TypeError: 'QueryDict' object is not callable Error rese ...
随机推荐
- BZOJ2008 JSOI2010连通数(floyd+bitset)
一直不明白为什么要用floyd求传递闭包,直接搜不是更快嘛……不过其实可以用bitset优化,方法也比较显然.bitset是真的神奇啊,好多01状态且转移相似的东西都可以用这个优化一下. #inclu ...
- Navicat的使用技巧
1.快速查找表:选中一个数据库,然后在右侧会弹出如下的搜索框,搜索表名即可 2.快速清空表的内容:在窗口选中一张表,右键,选择“清空表”
- 2073: [POI2004]PRZ
2073: [POI2004]PRZ Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 284 Solved: 213[Submit][Status][D ...
- wordcloud词云
借鉴别人的一个小例子,快速生成词云的代码: from wordcloud import WordCloud f = open(u'txt/AliceEN.txt','r').read() wordcl ...
- JDK源码分析(1)ArrayList
JDK版本 ArrayList简介 ArrayList 是一个数组队列,相当于 动态数组.与Java中的数组相比,它的容量能动态增长.它继承于AbstractList,实现了List, RandomA ...
- [POI2010]KLO-Blocks——一道值得思考的题
题目大意: 给出N个正整数a[1..N],再给出一个正整数k,现在可以进行如下操作:每次选择一个大于k的正整数a[i],将a[i]减去1,选择a[i-1]或a[i+1]中的一个加上1.经过一定次数的操 ...
- Python基础-简介一
一.Python介绍 1. Python的应用领域及流行程度 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间, ...
- 关于使用IsapiRewrite重写,重定向的语句
早上起床,发现之前的IsapiRewrite写法有改进的地方, 有几个废弃的网址可以使用IsapiRewrite的重定向,转到新的网址上来. 搞了有十分钟的时间,测试老是不重定向. 因为之前已经有一个 ...
- 跟我一起使用electron搭建一个文件浏览器应用吧(三)
第二篇博客中我们可以看到我们构建的桌面应用会显示我们的文件及文件夹. In the second blog, we can see that the desktop application we bu ...
- IDEA进行远程调试
biz-test本地调用测试环境01机器上面的needle项目,卡在查询数据库的地方(Jade停住不走了) 首先配置 相关项目 的服务器端部署jvm参数: 在needle的config.pp.temp ...