" RuntimeError: Model class wagtail.core.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS"
" RuntimeError: Model class wagtail.core.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS"
我在 wagtail 网站上关注了 Brent Clark。我试图添加 wagtail cms 以在后端使用 GraphQL 和 Python+Django 来反应应用程序。当我尝试迁移时出现此错误:
RuntimeError: Model class wagtail.core.models.Site doesn't declare
an explicit app_label and isn't in an application in INSTALLED_APPS
pip freeze 给出:
aniso8601==3.0.2
beautifulsoup4==4.6.3
certifi==2018.8.13
chardet==3.0.4
Django==2.0.8
django-modelcluster==4.2
django-taggit==0.23.0
django-treebeard==4.3
django-webpack-loader==0.6.0
djangorestframework==3.8.2
draftjs-exporter==2.1.2
graphene==2.1.3
graphene-django==2.1.0
graphql-core==2.1
graphql-relay==0.4.5
html5lib==1.0.1
idna==2.7
iso8601==0.1.12
Pillow==5.2.0
promise==2.1
psycopg2==2.7.5
pytz==2018.5
requests==2.19.1
Rx==1.6.1
singledispatch==3.4.0.3
six==1.11.0
typing==3.6.4
Unidecode==0.4.21
urllib3==1.23
wagtail==2.1.2
webencodings==0.5.1
Willow==1.1
您的 settings.py 文件中似乎没有安装该应用程序。
您需要将此添加到设置 "INSTALLED_APPS":
INSTALLED_APPS = [
...
'django.contrib.sites',
]
另外,您需要添加您正在配置的站点的ID:
SITE_ID = 1
我在 wagtail 网站上关注了 Brent Clark。我试图添加 wagtail cms 以在后端使用 GraphQL 和 Python+Django 来反应应用程序。当我尝试迁移时出现此错误:
RuntimeError: Model class wagtail.core.models.Site doesn't declare
an explicit app_label and isn't in an application in INSTALLED_APPS
pip freeze 给出:
aniso8601==3.0.2
beautifulsoup4==4.6.3
certifi==2018.8.13
chardet==3.0.4
Django==2.0.8
django-modelcluster==4.2
django-taggit==0.23.0
django-treebeard==4.3
django-webpack-loader==0.6.0
djangorestframework==3.8.2
draftjs-exporter==2.1.2
graphene==2.1.3
graphene-django==2.1.0
graphql-core==2.1
graphql-relay==0.4.5
html5lib==1.0.1
idna==2.7
iso8601==0.1.12
Pillow==5.2.0
promise==2.1
psycopg2==2.7.5
pytz==2018.5
requests==2.19.1
Rx==1.6.1
singledispatch==3.4.0.3
six==1.11.0
typing==3.6.4
Unidecode==0.4.21
urllib3==1.23
wagtail==2.1.2
webencodings==0.5.1
Willow==1.1
您的 settings.py 文件中似乎没有安装该应用程序。
您需要将此添加到设置 "INSTALLED_APPS":
INSTALLED_APPS = [
...
'django.contrib.sites',
]
另外,您需要添加您正在配置的站点的ID:
SITE_ID = 1