Django2 报错

报错 : Specifying a namespace in include() without providing an app_name ‘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.

这里写图片描述

如果出现这样的报错,需要在当前应用的urls中添加一行代码即可:
这里写图片描述

也就是
app_name = ‘当前你应用的名字

猜你喜欢

转载自blog.csdn.net/jeekmary/article/details/79665417