Здравствуйте, программисты, я следую инструкциям по установке 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.