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 ...
随机推荐
- 美图美妆由Try Try接手运营
美图又把一个拖累营收的业务转让出去了. 美图的电商业务——美图美妆应用在向用户发布终止运营的公告后,宣布把业务交给了寺库旗下公司 Try Try 运营.Try Try 接手了美图美妆的所有管理运营权, ...
- ansible系列8-SSH连接和执行性能优化
1. 当你的SSH的版本高于5.6时 我们可以直接修改 /etc/ansible/ansible.cfg里面的参数 ssh_args = -C -o ControlMaster=auto -o Con ...
- BZOJ3129 SDOI2013方程(容斥原理+扩展lucas)
没有限制的话算一个组合数就好了.对于不小于某个数的限制可以直接减掉,而不大于某个数的限制很容易想到容斥,枚举哪些超过限制即可. 一般情况下n.m.p都是1e9级别的组合数没办法算.不过可以发现模数已经 ...
- 自学Linux Shell12.7-控制循环break、continue命令
点击返回 自学Linux命令行与Shell脚本之路 12.7-控制循环break.continue命令 break命令.break命令用于跳出循环,使用break可以跳出任何类型的循环:for.whi ...
- 启用SharePoint 2013文档版本控制
cls $PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Nul ...
- emwin 之使用键盘数据发送函数的注意事项
@2018-08-08 小记 键盘实现时,在发送键值时, 函数 GUI_SendKeyMsg(GUI_KEY_BACKSPACE, Pressed) 的参数 Pressed 在按键按下状态的 case ...
- docker安装Zabbix
1. 先安装数据库mysqldocker run --name zabbix-mysql-server --hostname zabbix-mysql-server \-e MYSQL_ROOT_PA ...
- 解决TypeError: __init__() missing 1 required positional argument: 'on_delete'
试用Djiango的时候发现执行mange.py makemigrations 和 migrate是会报错,少位置参数on_delete,查了一下是因为指定外键的方式不对,改一下就OK了. 代码如下: ...
- js数组作为参数用ajax向后台传参数
/*前台往后台传参数时,可以这样写*/ var chessId = "123"; var i=0; var data = []; /*添加单个参数*/ data.push({nam ...
- 【题解】亚瑟王 HNOI 2015 BZOJ 4008 概率 期望 动态规划
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4008 一道不简单的概率和期望dp题 根据期望的线性性质,容易想到,可以算出每张卡的期望伤害, ...