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

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.

上一篇:ajax和axios的区别


下一篇:ASP.NET Core 2.1 中异步使用Dapper总结