首页 > 其他 > 详细

django 运行报错view must be a callable or a list/tuple in the case of include()

时间:2017-02-04 14:40:00      阅读:1828      评论:0      收藏:0      [点我收藏+]

  技术分享

  网上找了相关资料发现

  django 1.10之后不在支持URL用字符串表示了 
http://stackoverflow.com/questions/38744285/django-urls-error-view-must-be-a-callable-or-a-list-tuple-in-the-case-of-includ

  那我们换种写法,

  from myindex.bb import hi
  import myindex

  urlpatterns = [
  url(r‘^admin/‘, admin.site.urls),
  url(r‘^index‘, hi),
  ]

  测试通过,OK

django 运行报错view must be a callable or a list/tuple in the case of include()

原文:http://www.cnblogs.com/mgwm/p/6364597.html

(2)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!