Django的urls.py加载静态资源图片,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'^images/(?P<path>.*)$', s
Q:TypeError: view must be a callable or a list/tuple in the case of include() A:django 1.10版本改了写法了.首先要在引入view模块,其次后面URL设置里views.hello不要加引号了. E: from django.conf.urls import url from django.contrib import admin from blogapp import views urlpatterns =
在 blog app 下创建 urls.py, 定义该 app 下自有的 url : new/story from blog import views from django.conf import settings from django.conf.urls.static import static from django.conf.urls import url, include urlpatterns = [ url(r'new/story', views.introduce), ]+ s