pychaerm运行时出现: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.
说明在路由映射的时候出现“namespace”语法错误.
比如下图:
user的路由映射是正确的
而course的路由映射是错误的
namespace的语法:
path(‘url地址’,include((‘app的url文件’,‘命名’),namespace=‘命名’))