Skip to main content

A small app with a migration for converting deprecated cmsplugin-filer objects to djangocms plugin objects.

Project description

deprecate_cmsplugin_filer

A small app with a migration for converting deprecated cmsplugin-filer objects to djangocms plugin objects. Adapted from https://gist.github.com/wfehr/86ac31e8e263b872b746cc721662251e to add link and video plugin capability.

Things you'll want to evaluate before migrating:

  • Whether any custom project-level templates are in use for the cmsplugin filer modules. Any special customizations may need to be re-implemented in the djangocms-[file/link/picture/video] templates.

  • If you currently are using django config settings such as CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES or FILER_LINK_STYLES, you'll need to copy these as DJANGOCMS_PICTURE_TEMPLATES and DJANGOCMS_LINK_TEMPLATES, respectively. Note: there is a difference in behavior with FILER_LINK_STYLES and DJANGOCMS_LINK_TEMPLATES. The former would simply set a class while the latter expects a corresponding template to be created. Reference: https://github.com/divio/djangocms-link/#configuration

Migration steps:

  1. Before running the migration, you can run the following command to make sure you back up the old plugin tables for quick restoring if needed. ./manage.py dumpdata cmsplugin_filer_file cmsplugin_filer_folder cmsplugin_filer_image cmsplugin_filer_link cmsplugin_filer_video > ~/cmsplugin_filer.json

  2. Ensure you've installed the new plugins, added them to INSTALLED_APPS, and migrated: pip install djangocms-file djangocms-link djangocms-picture djangocms-video INSTALLED_APPS += ( 'djangocms_file', 'djangocms_link', 'djangocms_picture', 'djangocms_video', ) ./manage.py migrate

  3. I recommend also running the following command before and after the migration to get an inventory of the site's plugins and ensure they've all been migrated. ./manage.py cms list plugins

  4. Now the small app with the migration can be installed and run: ./manage.py migrate deprecate_cmsplugin_filer

  5. If you once again run ./manage.py cms list plugins, you should see the cmsplugin-filer objects have been converted to djangocms-[file/link/picture/video] objects.

  6. Do a spotcheck of plugins on the site. This is where you may see errors related to previous FILER_LINK_STYLES that are now expecting corresponding templates to be created for each style.

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

deprecate_cmsplugin_filer-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

deprecate_cmsplugin_filer-0.1.0-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file deprecate_cmsplugin_filer-0.1.0.tar.gz.

File metadata

  • Download URL: deprecate_cmsplugin_filer-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.10 Linux/5.4.0-110-generic

File hashes

Hashes for deprecate_cmsplugin_filer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ef5f387957eea33ecbdcff4eb228260d8c9538b7c498375b607e379b3857d78
MD5 133b4a5769aeb1ad52eda1640b66f4fb
BLAKE2b-256 b245153938d07a3363dcaf1d0d714b1f4ba01d178eaaef3abf05f32db0ab38b3

See more details on using hashes here.

File details

Details for the file deprecate_cmsplugin_filer-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for deprecate_cmsplugin_filer-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c38553c227dd428b27ad0f6062841d1be25b6f51f9648efd84d2f73e6c6444e
MD5 313245ed8b52dff974d892e952b09112
BLAKE2b-256 f1515c5233f35ee67dceb3c3dd4d9e492a71c2854f5b78bcc6c5a3485df826c5

See more details on using hashes here.

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