Skip to main content

django-cms plugins for django-filer

Project description

A set of cms plugins that replace the plugins shipped with django-cms with versions that use file fields from django-filer.

Warning: starting with version 0.10 support for django-cms 2.x was dropped (table renaming magic removal). Pin your dependencies to cmsplugin-filer<0.10 for django-cms 2.x projects.

NOTICE TO DJANGO 1.7 USERS:

To use cmsplugin-filer, you must use the latest commits from the 3.0.x branch of django CMS.

Dependencies

  • django-filer >= 0.9

  • Django >= 1.4

  • django-cms >= 3.0

  • django-sekizai >= 0.4.2

  • easy_thumbnails >= 1.0

  • django-appconf

Installation

To get started using cmsplugin-filer:

  • install it with pip:

    $ pip install cmsplugin-filer
  • configure django-filer as documented in http://django-filer.readthedocs.org/en/latest/installation.html#configuration

  • add the plugins to INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'cmsplugin_filer_file',
        'cmsplugin_filer_folder',
        'cmsplugin_filer_link',
        'cmsplugin_filer_image',
        'cmsplugin_filer_teaser',
        'cmsplugin_filer_video',
        ...
    )
  • for Django 1.7 users, you need to add the following to your MIGRATION_MODULES settings:

    MIGRATION_MODULES = {
        ...
        'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django',
        'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django',
        'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django',
        'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
        'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django',
        'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django',
        ...
    }
    
    NOTE: For Django 1.7, you **must** also be using the latest commits to the CMS Support 3.0.x branch and the latest develop branch of django-filer.
  • run migrate.

You can also set FILER_IMAGE_USE_ICON in your settings.py to configure cmsplugin_filer_image plugin to use 32x32 icons for representing plugin instances.

The default template in cmsplugin_filer_image expects the subject location functionality to be enabled. Follow: http://django-filer.readthedocs.org/en/0.9.2/installation.html#subject-location-aware-cropping

Upgrading

Please note that current develop version moved plugin packages from src directory to project root. This may break your installation if upgrading. Uninstall any previous cmsplugin_filer installation (either from Pypi or from github repository) and reinstall it.

Integrations

djangocms-text-ckeditor

cmsplugin_filer_image provides integration with djangocms-text-ckeditor. Add this setting to enable it:

TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin'

This allows dragging images into the text editor in Firefox and newer versions of IE.

Customisation

Most plugins (file, folder, image and teaser) support configuring custom “styles” (templates).

e.g add the following settings for the image plugin:

CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES = (
    ('default', 'Default'),
    ('boxed', 'Boxed'),
)
CMSPLUGIN_FILER_IMAGE_DEFAULT_STYLE = 'boxed'

Now, if a template exists at cmsplugin_filer_image/plugins/image/boxed.html it will be used. If not, it will fall back to cmsplugin_filer_image/plugins/image/default.html. If a css class in the default template is enough, it can be used in the template as {{ instance.style }}.

For backwards compatibility the plugin will always use cmsplugin_filer_image/image.html if it exists. Remove that template after migrating to the new structure.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmsplugin-filer-1.0.1.tar.gz (102.7 kB view details)

Uploaded Source

Built Distribution

cmsplugin_filer-1.0.1-py2.py3-none-any.whl (306.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cmsplugin-filer-1.0.1.tar.gz.

File metadata

File hashes

Hashes for cmsplugin-filer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 24cdad87257ab6204845f7a1e87a46c3672802209d7d699335e2bdab0d9ca04c
MD5 e5a825b6e3d3f3da3337c349ac2ef2fc
BLAKE2b-256 292004d5d162d7c0e45f1022f60cbb554ae028e0e13e75ee7e47b778687f706f

See more details on using hashes here.

Provenance

File details

Details for the file cmsplugin_filer-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cmsplugin_filer-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3dea74b48e8914c517de6ee6661a775eb0b724a9643e434a821bf4507b7ccd6c
MD5 4b557e0da96fd4d1a2109196ee8b7fc1
BLAKE2b-256 06aa68b097f1e9708fc720d66005f777c58ca5ab3831839331e9bff0d022a954

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page