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.
改成如下形式:
1 from django.contrib import admin 2 from django.urls import path 3 from django.conf.urls import url, include 4 5 urlpatterns = [ 6 path('admin/', admin.site.urls), 7 url(r'^app/', include('App.urls')), 8 url(r'^two/', include(('Two.urls', 'second'),namespace='second')), 9 ]
参考链接:https://blog.csdn.net/jason_cdd/article/details/106953974