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:
-
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
-
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
-
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
-
Now the small app with the migration can be installed and run: ./manage.py migrate deprecate_cmsplugin_filer
-
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.
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ef5f387957eea33ecbdcff4eb228260d8c9538b7c498375b607e379b3857d78 |
|
MD5 | 133b4a5769aeb1ad52eda1640b66f4fb |
|
BLAKE2b-256 | b245153938d07a3363dcaf1d0d714b1f4ba01d178eaaef3abf05f32db0ab38b3 |
File details
Details for the file deprecate_cmsplugin_filer-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: deprecate_cmsplugin_filer-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.8.10 Linux/5.4.0-110-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c38553c227dd428b27ad0f6062841d1be25b6f51f9648efd84d2f73e6c6444e |
|
MD5 | 313245ed8b52dff974d892e952b09112 |
|
BLAKE2b-256 | f1515c5233f35ee67dceb3c3dd4d9e492a71c2854f5b78bcc6c5a3485df826c5 |