本文共 617 字,大约阅读时间需要 2 分钟。
在pip install django-haystack时
'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.
不难分析, 这个应该是Django由1.X升级到3.X带来的新问题
Django3.X要改为下面这种写法DEFAULT_AUTO_FIELD = ‘django.db.models.AutoField’
转载地址:http://aunq.baihongyu.com/