Getting error: “TypeError: view must be a callable or a list/tuple in the case of include().” when running Django Server

解决方案:http://stackoverflow.com/questions/40619208/getting-error-typeerror-view-must-be-a-callable-or-a-list-tuple-in-the-case-o

from django.conf import settings
from django.conf.urls.static import static urlpatterns = [
# ... the rest of your URLconf goes here ...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

或者

from django.views.static import serve

urlpatterns = [
...
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
]

最新文章

  1. 配置163Yum源自动判断你的系统是Centos版本(适用于5.x或6.x)
  2. HDU 5923 Prediction
  3. HBase 专题技术收录
  4. 左右Map
  5. sdut 上机练习8面向对象编程(对象的数组)
  6. Guacamole 介绍
  7. bzoj2301: [HAOI2011]Problem b懵逼乌斯反演
  8. 概述java语言
  9. CentOS7 下安装telnet服务
  10. VS中的快捷键快速格式化代码,使好看,整齐
  11. asp.net -mvc框架复习(5)-ASP.NET MVC中的视图简单使用
  12. 让你的代码减少三倍!使用kotlin开发Android(五) 监听器
  13. python第二天3.1
  14. ASP.NET Easyui datagrid增删改+sqlhelper
  15. 利用python操作excel
  16. 使用starUML一步一步画顺序图
  17. Linux 命令之split(将一个大文件根据行数平均分成若干个小文件)
  18. python中执行shell命令行read结果
  19. UVa 11054 Gergovia的酒交易
  20. 各种 Java Thread State【转载】

热门文章

  1. Maven中setting.xml配置Demo
  2. C#秘密武器之特性
  3. 使用 ssh 从 Gerrit 获取 patch 信息
  4. iOS 判断NSString是否包含某个字符串
  5. 算法笔记_069:Floyd算法简单介绍(Java)
  6. vue 不能检测数组长度 值变化原因解析
  7. 关于苹果开发证书失效的解决方式(2016年2月14日Failed to locate or generate matching signing assets)
  8. ionic emulate android log
  9. CodeForces 390E Inna and Large Sweet Matrix(树状数组改段求段)
  10. JavaScript-常用正则函数(适合忘记时看)