Py学习  »  Django

django.settings.installedApps中的django fluent内容安装不正确

Adriel Werlich • 6 年前 • 1722 次点击  

各位程序员好,我按照以下步骤安装django fluent内容 从链接

https://django-fluent-contents.readthedocs.io/en/latest/ 快速启动.html

1-pip安装django fluent内容

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安装django fluent内容[文本,代码]

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添加到已安装的应用程序中……但现在错误信息如下:

    "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.
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/47713
文章 [ 1 ]  |  最新文章 6 年前