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 ...
随机推荐
- echarts之简单的入门——【一】做个带时间轴的柱状统计图
百度Echarts 官网首页 http://echarts.baidu.com/ 配置项手册 http://echarts.baidu.com/option.html#title GL配置项手册 h ...
- webapi 405 method not allowed
问题的原因:创建webapi controller时,习惯创建了mvc的controller,而非api controller.导致引用包有问题. 这两天搞webapi开发的时候,遇见了405错误. ...
- 自学Linux Shell13.3-获得用户输入(read命令)
Bash shell提供了一些不同的方法来从用户处获得数据,包括以下3中方法: 命令行参数(添加在名利后面的数据) 命令行选项(可修改命令行为的单个字母)主要getopt.getopts命令 直接从键 ...
- adb 命令 链接 安装应用
adb connect 192.168.11.1:5555(可省略) adb kill-server 杀掉服务 adb install xxx.apk
- SharePoint 2013 pre-config
#region 1. add winrm, application server and web server role Add-WindowsFeature winrm-iis-ext, Appli ...
- 收藏:解决其它程序与IIS共享80端口的四个方法
今天写的程序也占用80端口,而 IIS也占用 80端口,我在我的一张网卡上分配了两个IP地址,但是测试发现:只要IIS启动后,我写的程序就无法使用80端口,到网上搜索了一下,终于找到了解决办法: 使用 ...
- 原生js操作option
<script type="text/javascript"> // 1.动态创建select function createSelect() { var mySele ...
- udp之关于linux udp收发包缓冲区大小
1.修订单个socket的缓冲区大小:通过setsockopt使用SO_RCVBUF来设置接收缓冲区,该参数在设置的时候不会与rmem_max进行对比校验,但是如果设置的大小超过rmem_max的话, ...
- java.lang.ClassCastException:java.util.LinkedHashMap不能转换为com.testing.models.Account
ObjectMapper mapper=new ObjectMapper();POJO pojo = mapper.convertValue(singleObject, POJO.class);
- oracle使用using关键字
oracle使用using关键字sql/92标准可以使用using关键字来简化连接查询,但是只是在查询满足下面两个条件时,才能使 用using关键字进行简化.1.查询必须是等值连接.2.等值连接中的列 ...