Categories: djangopython

解决django运行时报错Specifying a namespace in include()

python3 Django2.0 环境下,如果你遇到namespace没有注册以及在根目录下urls.py中的include方法的第二个参数namespace添加之后就出错的问题。请在[app_name]目录下的urls.py中的urlpatterns前面加上app_name='app_name', app_name代表你的应用的名称。可以参考这篇:https://stackoverflow.com/questions/14892462/django-error-upolls-is-not-a-registered-namespace

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 the included module, or pass a 2-tuple containing the list of patterns and app_name instead.

 

 

Kai

Share
Published by
Kai
Tags: django

Recent Posts

Dell ME4存储管理口无法登录修复

这次碰到一台DELL ME40…

1 天 ago

分享个便宜速度快的云主机

野草云 https://my.…

1 月 ago

众筹微软大佬徐庭老师M365课程

 联系邮箱:gyd1#vip.…

2 月 ago

求职

 邮箱:gyd1#vip.qq…

2 月 ago

MySQL EOL和版本推荐

   MySQL 5.7版本已…

2 月 ago

DirectStorage 1.3 现已推出

 DirectStorage …

2 月 ago