我在w场上关注了布伦特·克拉克。我试图在后台添加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
点冻结会给出:
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
答案 0 :(得分:0)
这表明您的settings.py文件中未安装该应用。
您需要将此添加到设置“ INSTALLED_APPS”:
INSTALLED_APPS = [
...
'django.contrib.sites',
]
此外,您需要添加要配置的SITE的ID:
SITE_ID = 1