Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 带有'的错误;cmsplugin_filer_image';(1.8)_Python_Django - Fatal编程技术网

Python 带有'的错误;cmsplugin_filer_image';(1.8)

Python 带有'的错误;cmsplugin_filer_image';(1.8),python,django,Python,Django,我对“cmsplugin\u filer\u image”有问题。当我尝试运行服务器或进行迁移时,会显示错误: 错误: cmsplugin_filer_image.FilerImage.cmsplugin_ptr:(fields.E300)字段定义与未安装或抽象的模型“cmsplugin”的关系。 cmsplugin_filer_image.FilerImage.page_link:(fields.E300)字段定义了与未安装或抽象的模型“page”的关系 我使用django 1.8.3操作系统

我对“cmsplugin\u filer\u image”有问题。当我尝试运行服务器或进行迁移时,会显示错误:

错误: cmsplugin_filer_image.FilerImage.cmsplugin_ptr:(fields.E300)字段定义与未安装或抽象的模型“cmsplugin”的关系。 cmsplugin_filer_image.FilerImage.page_link:(fields.E300)字段定义了与未安装或抽象的模型“page”的关系

我使用django 1.8.3操作系统Linux(Ubuntu 14.04)

对不起,我的英语不好

设置.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'

也许您没有满足依赖关系

在的github页面中,您需要安装:

  • django文件管理器>=0.9
  • Django>=1.4
  • django cms>=3.0
  • django sekizai>=0.4.2
  • 简易缩略图>=1.0
  • django appconf
这些应用程序不会出现在您的设置中

此外,在中可以看到导入,特别是这一部分:

from cms.models import CMSPlugin
from cms.models.fields import PageField
这些型号来自django cms(第64行)和(第81行)。在中,您可以看到对“cms.Page”的引用