各位程序员,您好,我正在按照链接中的步骤安装 django-fluent-contents
https://django-fluent-contents.readthedocs.io/en/latest/quickstart.html _
1- pip install django-fluent-contents
2-基本设置接下来,创建一个使用该模块的项目。可以安装基本模块,也可以添加可选插件:
INSTALLED_APPS += (
'fluent_contents',
'django_wysiwyg',
# And optionally add the desired plugins:
'fluent_contents.plugins.text', # requires django-wysiwyg
'fluent_contents.plugins.code', # requires pygments
'fluent_contents.plugins.gist',
'fluent_contents.plugins.googledocsviewer',
'fluent_contents.plugins.iframe',
'fluent_contents.plugins.markup',
'fluent_contents.plugins.rawhtml',
)
3- pip install django-fluent-contents[文本,代码]
4-然后运行 python manage.py migrate
然后,错误消息:
D:\projetos\fluent\fluentdemo>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "C:\ProgramData\Anaconda3\lib\site-packages\django\core\management\__init__.py", line 381, in RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
我试过激活和不激活虚拟环境,同样的错误信息!!
.......然后我按照@solarissmoke 的建议,将 django.contrib.site 添加到 INSTALLED_APPS .... 但现在错误消息是这样的:
"D:\projetos\fluent\fluentdemo\fluentdemo\veenv\lib\site-packages\fluent_contents\plugins\markup\models.py", line 10, in <module>
from fluent_contents.plugins.markup import appsettings, backend
File "D:\projetos\fluent\fluentdemo\fluentdemo\veenv\lib\site-packages\fluent_contents\plugins\markup\appsettings.py", line 34, in <module>
raise ImproperlyConfigured("The '{0}' package is required to use the '{1}' language for the '{2}' plugin.".format(backendapp, language, 'markup'))
django.core.exceptions.ImproperlyConfigured: The 'docutils' package is required to use the 'restructuredtext' language for the 'markup' plugin.