TypeError: view must be a callable or a list/tuple in the case of include()
2016-10-08 21:17
746 查看
在django 1.10 里面urls.py 新的写法:
urls.py 文件里添加blog的url:
如果使用django1.10以下的版本则写法:
urls.py 文件里添加blog的url:
from django.conf.urls import url from django.conf.urls import include from django.contrib import admin from blog.views import index urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^index/$',index), ]
如果使用django1.10以下的版本则写法:
from django.conf.urls import url from django.conf.urls import include from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^index/$',"blog.views.index"), ]
相关文章推荐
- 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().
- 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()
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- django 单元测试报错: view must be a callable or a list/tuple in the case of include().
- Django URLs error: view must be a callable or a list/tuple in the case of include()
- python django1.10解决view must be a callable list/tuple in case of include()
- error -5008: intel64 or amd64 must be specified in the template of the summary
- error: (-5) in the case of classification problem the responses must be cate
- Pymongo: TypeError: if no direction is specified, key_or_list must be an instance of list
- In order to run a trace against SQL Server you must be a member of sysadmin fixed server role or have the ALTER TRACE permission.
- This error is raised because the column 'type' is reserved for storing the class in case of inheritance
- python 学习---isinstance() arg 2 must be a type or tuple of types
- Main application must be in the list of application paths
- An error occurred at line: 7 in the generated java file Only a type can be imported. java.util.list
- Uncaught (in promise) TypeError: Super expression must either be null or a function
- System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- Err:The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array