问题:
File "D:\Python34\lib\site-packages\django\urls\conf.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 '
原文地址:https://www.cnblogs.com/chenliwei/p/9413244.html
时间: 2024-10-18 00:32:14