urlpatterns = [ path('admin/', admin.site.urls), # 定义了在管理网站中请求所有URL url(r'', include('learning_logs.urls', namespace='learning_logs')), # namespace使得learning_logs中同项目的其他url可以区分开 ]
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.
urlpatterns = [ path('admin/', admin.site.urls), # 定义了在管理网站中请求所有URL url(r'', include(('learning_logs.urls', 'learning_logs'))), # namespace使得learning_logs中同项目的其他url可以区分开 ]