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

这个错误的原因是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 blog.views import hello

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^helloworld', hello)
]

你可能感兴趣的:(django经验)