django-fluent-contents not installing correctly in django.settings.installedApps

161 Views Asked by At

Hello fellow programmers, I´m following the steps to install django-fluent-contents from the link

https://django-fluent-contents.readthedocs.io/en/latest/ quickstart.html

1- pip install django-fluent-contents

2- Basic setup Next, create a project which uses the module. The basic module can be installed and optional plugins can be added:

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[text,code]

4- then running python manage.py migrate

and then, error message:

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.

I´ve tried with and without virtual enviroment activated, same error message!!

.......then I followed the advice of @solarissmoke, adding the django.contrib.site to INSTALLED_APPS .... but now the error message is like this:

    "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.
1

There are 1 best solutions below

2
On

It doesn't seem to be mentioned in the documentation, but this app requires django.contrib.sites to be installed, and you're getting an error because it isn't.

Try adding django.contrib.sites to your INSTALLED_APPS.