django-cms / djangocms-bootstrap4

django CMS Bootstrap 4 is a plugin bundle for django CMS providing several components from the popular Bootstrap 4 framework.
https://www.django-cms.org/
Other
82 stars 58 forks source link

RuntimeError: Model class easy_thumbnails.models.Source doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. #86

Closed jmona789 closed 5 years ago

jmona789 commented 5 years ago

Hi, I'm starting a new project and tring to use this package, I installed using pip install djangocms-bootstrap4 and I added

'djangocms_icon',
'djangocms_link',
'djangocms_picture',
'djangocms_bootstrap4',
'djangocms_bootstrap4.contrib.bootstrap4_alerts',
'djangocms_bootstrap4.contrib.bootstrap4_badge',
'djangocms_bootstrap4.contrib.bootstrap4_card',
'djangocms_bootstrap4.contrib.bootstrap4_carousel',
'djangocms_bootstrap4.contrib.bootstrap4_collapse',
'djangocms_bootstrap4.contrib.bootstrap4_content',
'djangocms_bootstrap4.contrib.bootstrap4_grid',
'djangocms_bootstrap4.contrib.bootstrap4_jumbotron',
'djangocms_bootstrap4.contrib.bootstrap4_link',
'djangocms_bootstrap4.contrib.bootstrap4_listgroup',
'djangocms_bootstrap4.contrib.bootstrap4_media',
'djangocms_bootstrap4.contrib.bootstrap4_picture',
'djangocms_bootstrap4.contrib.bootstrap4_tabs',
'djangocms_bootstrap4.contrib.bootstrap4_utilities',

to my INSTALLED_APPS as per the README. But when I try and run python manage.py migrate I get the following error;

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
    django.setup()
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models()
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/djangocms_picture/models.py", line 15, in <module>
    from easy_thumbnails.files import get_thumbnailer
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/easy_thumbnails/files.py", line 14, in <module>
    from easy_thumbnails import engine, exceptions, models, utils, signals, storage
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/easy_thumbnails/models.py", line 70, in <module>
    class Source(File):
  File "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/lib/python2.7/site-packages/django/db/models/base.py", line 118, in __new__
    "INSTALLED_APPS." % (module, name)
RuntimeError: Model class easy_thumbnails.models.Source doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

I get the same error when I try to run the project in PyCharm. Any idea how I fix this?

jmona789 commented 5 years ago

Nevermind, figured it out, need to pip install django-filer and add

    'easy_thumbnails',
    'filer',
    'mptt',

to INSTALLED_APPS