我在鹡鸰网站上关注了布伦特·克拉克。我试图在后端添加鹡鸰 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
点冻结给出:
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