Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Cannot add new installed apps - 'bool' object has no attribute '_meta'
Post Body

Hi! - So I'm trying to add djangocms_blog to my website. Most of the dependences have loaded without issues, but two I'm struggling with: filer and djangocms_blog. The traceback (when enabling 'djangocms_blog') is below:

Exception in thread django-main-thread:

Traceback (most recent call last):

File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner

self.run()

File "/usr/lib/python3.7/threading.py", line 865, in run

self._target(*self._args, **self._kwargs)

File "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line 54, in wrapper

fn(*args, **kwargs)

File "/usr/local/lib/python3.7/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run

autoreload.raise_last_exception()

File "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception

raise _exception[1]

File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 337, in execute

autoreload.check_errors(django.setup)()

File "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line 54, in wrapper

fn(*args, **kwargs)

File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup

apps.populate(settings.INSTALLED_APPS)

File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 116, in populate

app_config.import_models()

File "/usr/local/lib/python3.7/dist-packages/django/apps/config.py", line 211, in import_models

self.models_module = import_module(models_module_name)

File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib.\_bootstrap>", line 1006, in _gcd_import

File "<frozen importlib.\_bootstrap>", line 983, in _find_and_load

File "<frozen importlib.\_bootstrap>", line 967, in _find_and_load_unlocked

File "<frozen importlib.\_bootstrap>", line 677, in _load_unlocked

File "<frozen importlib.\_bootstrap\_external>", line 728, in exec_module

File "<frozen importlib.\_bootstrap>", line 219, in _call_with_frames_removed

File "/usr/local/lib/python3.7/dist-packages/djangocms_blog/models.py", line 188, in <module>

class Post(KnockerModel, BlogMetaMixin, TranslatableModel):

File "/usr/local/lib/python3.7/dist-packages/djangocms_blog/models.py", line 206, in Post

related_name='djangocms_blog_post_image')

File "/usr/local/lib/python3.7/dist-packages/filer/fields/file.py", line 127, in __init__

dfl = get_model_label(self.default_model_class)

File "/usr/local/lib/python3.7/dist-packages/filer/utils/model_label.py", line 21, in get_model_label

model._meta.app_label,

AttributeError: 'bool' object has no attribute '_meta'

settings.py
import os
gettext = lambda s: s
PROJECT_PATH = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ..

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = [

# Application definition
INSTALLED_APPS = [
    'Predictor.apps.PredictorConfig',
    'djangocms_admin_style',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admindocs',
    'django_celery_beat',
    'django.contrib.sites',
    'bootstrap4',
    'jquery',
    'filer',
    'cms',
    'mptt',  # utilities for implementing a modified pre-order traversal tree
     'menus',  # helper for model independent hierarchical website navigation
    'sekizai',  # for javascript and css management
    'treebeard',
    'easy_thumbnails',
    #---------------------
    'djangocms_text_ckeditor',
'aldryn_apphooks_config',
    'parler',
    'taggit',
    'taggit_autosuggest',
    'meta',
    'sortedm2m',
    'djangocms_blog',
    #'djangocms_link',
 #'djangocms_file',
    #'djangocms_picture',
    #'djangocms_video',
#'djangocms_googlemap',
    #'djangocms_snippet',
    #'djangocms_style',
 #'djangocms_column',
 #'djangocms_icon',
#'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',
]
FILER_IMAGE_MODEL = False
THUMBNAIL_HIGH_RESOLUTION = True

THUMBNAIL_PROCESSORS = (
    'easy_thumbnails.processors.colorspace',
    'easy_thumbnails.processors.autocrop',
    'filer.thumbnail_processors.scale_and_crop_with_subject_location',
    'easy_thumbnails.processors.filters'
)
SITE_ID=1
MIDDLEWARE = [
    'cms.middleware.utils.ApphookReloadMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    #'django.middleware.doc.XViewMiddleware',
    'cms.middleware.page.CurrentPageMiddleware',
    'cms.middleware.user.CurrentUserMiddleware',
    'cms.middleware.toolbar.ToolbarMiddleware',
    'cms.middleware.language.LanguageCookieMiddleware',    
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.contrib.messages.context_processors.messages',
    #'django.core.context_processors'
    'django.core.context_processors.i18n',
    #'django.core.context_processors.request',
    #'django.core.context_processors.media',
    #'django.core.context_processors.static',
    'cms.context_processors.cms_settings',
   # 'sekizai.context_processors.sekizai',
)
BROKER_URL = '//localhost:6379'
CELERY_RESULT_BACKEND = 'redis://localhost:6379'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/London'

X_FRAME_OPTIONS = 'SAMEORIGIN'
ROOT_URLCONF = 'Website.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ['templates'],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                #'django.core.context_processors.i18n',
                'django.template.context_processors.request',
                #'django.core.context_processors.media',
                #'django.core.context_processors.static',
                'cms.context_processors.cms_settings',
                'sekizai.context_processors.sekizai',
            ],
        },
    },
]
TEMPLATE_DIRS = (
    # The docs say it should be absolute path: PROJECT_PATH is precisely one.
    # Life is wonderful!
    os.path.join(PROJECT_PATH, "templates"),
)
CMS_TEMPLATES = [
    ('home.html', 'Home page template'),
        ('fullwidth.html', 'Fullwidth'),
    ('sidebar_left.html', 'Sidebar Left'),
    ('sidebar_right.html', 'Sidebar Right')
]
WSGI_APPLICATION = 'Website.wsgi.application'

LANGUAGES = [
    ('en-gb', 'English'),
]


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/

LANGUAGE_CODE = 'en-gb'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_ROOT = os.path.join(PROJECT_PATH, "static")
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(PROJECT_PATH, "media")
MEDIA_URL = "/media/"
# Custom

Unfortunately it's an error which doesn't seem exactly clear on the root cause... The error disappears when I comment out filer and djangocms_blog. Not sure what it could be, so any help on troubleshooting this would be great. Thanks!

Author
Account Strength
90%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
3,033
Link Karma
10
Comment Karma
3,023
Profile updated: 3 days ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago