Specifying a namespace in include() without providing an app_name is not supported.

报错信息:

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应该是 chatterbot_urls 里的属性(attribute),在app目录下的urls.py文件中直接定义这个变量app_name,并赋值为你的app名称即可。

你上传的这个urls.py应该是项目目录中的。以下是我的app目录下的urls.py的内容:

from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
]

app_name = 'users'

猜你喜欢

转载自blog.csdn.net/beta_safe/article/details/80107421