'Specifying a namespace in include() without providing an app_name '
Posted chenliwei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了'Specifying a namespace in include() without providing an app_name '相关的知识,希望对你有一定的参考价值。
问题:
File "D:Python34libsite-packagesdjangourlsconf.py", line 39, in include ‘Specifying a namespace in include() without providing an app_name ‘ django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in t he included module, or pass a 2-tuple containing the list of patterns and app_na me instead.
处理方法:
解决方法,在mysite/urls.py增加app_name=‘mysite‘
‘‘‘定义mysite的url模式‘‘‘ from django.conf.urls import url from . import views app_name=‘mysite‘ urlpatterns={ #主页 url(r‘^$‘,views.index,name=‘index‘) }
以上是关于'Specifying a namespace in include() without providing an app_name '的主要内容,如果未能解决你的问题,请参考以下文章
'Specifying a namespace in include() without providing an app_name '
4.8 Routing -- Specifying The URL Type
指定表单使用的路由 Specifying the Route Used by a Form
Part of defining a topology is specifying for each bolt which streams it should receive as input(示例代
Django2.0异常:Specifying a namespace in include() without providing an app_name is not supported.
Django学习之django3.0.3报错:Specifying a namespace in include() without providing an app_name