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

  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出现的错误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 ...

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

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

  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. appium 提示报错“TypeError: 'unicode' object is not callable”的解决方式!

    这里提到的这个报错,是小错误且容易经常会犯,有时需要特别注意使用. 目的要求结果:根据某个元素的id值获取到对应id的text值,并且将获取的text值与本身存在的text值做比较,查看text值是否 ...

  8. python import 错误 TypeError: 'module' object is not callable

    python import 错误 TypeError: 'module' object is not callable 在这里,有 Person.py test.py; 在 test.py 里面 im ...

  9. Django之urls.py详解

    urls.py:URL分发器(路由配置文件)URL配置(URLconf)就像是Django所支撑网站的目录.它的本质是URL模式以及要为该URL模式调用的视图函数之间的映射表.你就是以这种方式告诉Dj ...

随机推荐

  1. iOS VIPER架构(三)

    路由是实现模块间解耦的一个有效工具.如果要进行组件化开发,路由是必不可少的一部分.目前iOS上绝大部分的路由工具都是基于URL匹配的,优缺点都很明显.这篇文章里将会给出一个更加原生和安全的设计,这个设 ...

  2. mangoDB笔记

    1.  查询 db.表.find().pretty() find(querry,project) pretty()格式化显示 findOne()  返回一条结果 比较 db.Decl_In.find( ...

  3. extranuclear gene|non-Mendelian inheritance|uniparental inheritance|maternal inheritance

    5.8某些细胞器含有DNA 因为除细胞核内的染色体外,细胞质中的细胞器上也有遗传物质(这类遗传物质被称为核外基因(extranuclear gene),比如线粒体上的rRNA,这是因为细胞器基因组是独 ...

  4. IDEA 官方背景与修改jsp模板以及字体大小

    一.官方背景切换 方法一:先打开file找到Settings  如图: 也可以用快捷方式打开:Ctrl+alt+s  打开 找到Editor点击进入 ,再然后找Color Scheme 可以看到如下图 ...

  5. CV做直方图的比较说明图形越相似性

    #include "opencv/cv.hpp" #include "opencv2/objdetect/objdetect.hpp" #include &qu ...

  6. NSCharacterSet去除字符串中的空格、删除指定\任意字符集

    一.去除首尾的空格 /** 1.去除首尾的空格*/ NSString *strMsg=@" 简书作者:CoderZb "; NSString *strResult = [strMs ...

  7. css文件和js文件后面带一个问号----2015-1103

    经常看一些网站页面源代码中的css文件和js文件后面带一个问号,后面跟着一连串数字或字符,这是干什么用的? 这个方法我也用过,而且很好用?,它的作用有两个:1.作为版本号,让自己方便记忆.查找:2.作 ...

  8. c++ 函数指针应用,定义一个方法,传入两个参数和一个函数指针,并返回结果

    #include <iostream> #include <string> using namespace std; double add(double x, double y ...

  9. 【bitset 技巧 分块】bzoj5087: polycomp

    神仙zq发现了${n^2\sqrt n}\over 32$做法 Description 你有三个系数为0,1的多项式f(x),g(x),h(x) 求f(g(x)) mod h(x) 为方便起见,将答案 ...

  10. ubuntu系统普通用户密码忘记之重置

    当我们在使用ubuntu系统忘记普通用户登录密码的时候,会被系统在登录界面拒之门外而不得入,这时候只好需要我们去重新设置密码,具体做法如下: 系统重启,在GRUB模式下选择Advanced Optio ...