原文连接:

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()的更多相关文章

  1. 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(). ...

  2. 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'),出错: ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. python Flask :TypeError: 'dict' object is not callable

    flask 基于Werkzeug .. @moudule.route('/upload', methods=['GET', 'POST']) def upload_file(): global _fl ...

  8. 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   ...

  9. TypeError: 'QueryDict' object is not callable

    id = int(request.POST('id')) Error message: TypeError: 'QueryDict' object is not callable Error rese ...

随机推荐

  1. lambda函数对象与作用域 (重点)

    Python函数在定义的时候,默认参数L的值就被计算出来了,即[],因为默认参数L也是一个变量,它指向对象[],每次调用该函数,如果改变了L的内容,则下次调用时,默认参数的内容就变了,不再是函数定义时 ...

  2. 认真学习Linux系统让你真的有收获

    学习,最重要的是有一个认真的态度,熟话说,读书可以改变命运,以前觉得并不一定是这样,其实经历的多了才知道,事实确实如此.试想一个不会写字看书的人,他的生活该有多么无聊.读书容易,但读好书并不总是件容易 ...

  3. LOJ121 动态图连通性(LCT)

    用LCT维护一下删除时间的最大生成树即可.当然也可以线段树分治. #include<iostream> #include<cstdio> #include<cmath&g ...

  4. pipreqs 组件

    作用 帮助你查询所有需要用的组件 安装 pip install pipreqs   使用 """ 切换到项目的路径下 执行查询当前文件下所需要的所有的组件 会生成一个 r ...

  5. 【转】cJSON 源码分析

    cJSON源码分析 简介 由于C语言汇总,没有直接的字典,字符串数组等数据结构,所以要借助结构体定义,处理json. JSON是一种轻量级的数据交换格式.JSON采用完全独立与语言的文本格式,易于人阅 ...

  6. 老铁,这年头得玩玩这个:Git基本操作【github】

    GitHub创建项目 本地创建项目 1.初始化配置,设置仓库人员的用户名和邮箱地址,这一步必不可少 git config --global user.name "uncleyong" ...

  7. cf827D Best Edge Weight (kruskal+倍增lca+并查集)

    先用kruskal处理出一个最小生成树 对于非树边,倍增找出两端点间的最大边权-1就是答案 对于树边,如果它能被替代,就要有一条非树边,两端点在树上的路径覆盖了这条树边,而且边权不大于这条树边 这里可 ...

  8. 使用nagios监控ssl证书过期时间

    1.编写监控脚本. # vim check_ssl_expiry.sh #!/bin/bash STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 Host=$1 ...

  9. Asp: 解决脚本输出网页出现乱码情况

    很久没碰asp,都有点生疏了,唉... 今天写一个小程序,发现网页静态部分输出不会乱码,asp脚本部分输出在360浏览器上会显示乱码,但在firefox和chrome上测试却不会显示乱码,我已经在代码 ...

  10. poj 2186 "Popular Cows"(强连通分量入门题)

    传送门 参考资料: [1]:挑战程序设计竞赛 题意: 每头牛都想成为牛群中的红人. 给定N头牛的牛群和M个有序对(A, B),(A, B)表示牛A认为牛B是红人: 该关系具有传递性,所以如果牛A认为牛 ...