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

来源:互联网 发布:zuk z2优化相机 编辑:程序博客网 时间:2024/06/05 15:03

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


view must be a callable or a list/tuple in the case of include()

是因为django 1.10之后不在支持URL用字符串表示了 ;或者定义的url存在问题

所以修改 urls.py 中的定义url即可

  from myindex.bb import hi  import myindex  urlpatterns = [  url(r'^admin/', admin.site.urls),  url(r'^index', hi),  ]


阅读全文
0 0
原创粉丝点击