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

VC 6.0 挂服务 提示503

我们有一台VC 6.0的服务挂…

2 周 ago

零成本grass挖矿教程

最近发现个新币,还没上交易所,…

3 周 ago

Windows Server 2025 的AD架构版本

   Windows 2025…

4 周 ago

【项目】跨数据中心(跨站点)Exchange Server 2013恢复/高可用

今年换到一家乙方公司了,主要工…

4 周 ago

主域挂了怎么办?

假设在极端情况下,没有备份的前…

1 月 ago

为什么在AD管理中只能看到3个操作主机?

我们在日常的Windows域管…

1 月 ago