首页 > 移动平台 > 详细

Django:django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported.

时间:2021-06-30 18:28:24      阅读:23      评论:0      收藏:0      [点我收藏+]
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path(admin/, admin.site.urls),
    # 错误代码演示
    # path(‘axf/‘, include(‘App.urls‘, namespace=‘axf‘))
    # 正确的代码
    path(axf/, include((App.urls, axf), namespace=axf))
]

 

Django:django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported.

原文:https://www.cnblogs.com/leoych/p/14954734.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!