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.
報錯中已說明解決辦法,設置app_name屬性,或者傳遞一個兩個元素的元祖,包含路由匹配列表和app_nameweb
app_name='app' urlpatterns = [ url(r'^index/',views.index), ]
urlpatterns = [ url(r'^app/', include(('app.urls.,'app'), namespace='app')), ]