我有 'cmsplugin_filer_image' 的問題。當我試圖運行我的服務器或makemigrations它顯示我的錯誤:錯誤與 'cmsplugin_filer_image'(django1.8)
錯誤: cmsplugin_filer_image.FilerImage.cmsplugin_ptr:(fields.E300)字段定義與模式「CMSPlugin」,這是未安裝的關係,或者是抽象的。 cmsplugin_filer_image.FilerImage.page_link:(fields.E300)字段定義與模型「頁面」,其或者沒有安裝,或者是抽象的關係。
我使用Django 1.8.3我的操作系統 - 的Linux(Ubuntu的14.04)
對不起我的英文不好))
settings.py
import os
ALLOWED_HOSTS = []
# Application definition
MIGRATION_MODULES = {
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
}
INSTALLED_APPS = (
'grappelli',
'filebrowser',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'cub_app',
'ckeditor',
'ckeditor_uploader',
'filer',
'easy_thumbnails',
'cmsplugin_filer_image',
'ckeditor_filebrowser_filer',
)
THUMBNAIL_HIGH_RESOLUTION = True
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'cub.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
"django.core.context_processors.request",
],
},
},
]
WSGI_APPLICATION = 'cub.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, '..', 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')
STATIC_URL = '/static/'
STATIC_ROOT = '/home/igor/work/virtualenvs/cubing/src/cub/cub_app/static/'
PORTAL_URL = 'http://localhost:8000'
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_JQUERY_URL = 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
CKEDITOR_UPLOAD_SLUGIFY_FILENAME = True
TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin'
CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES = (
('default', 'Default'),
('boxed', 'Boxed'),
)
CMSPLUGIN_FILER_IMAGE_DEFAULT_STYLE = 'boxed'
感謝)它了工作 –