-
Notifications
You must be signed in to change notification settings - Fork 1
How to Use DjangoCMS Transfer
Recreate or Save plugin configuration on pages even across different CMS projects.
- Watch djangocms-transfer README video.
- Import/Export plugins to achieve your task.
It does not support foreign key relations and won't import/export related data. —
djangocms-transfer
Readme
This means that users should delete images (and other media) before exporting. See Workarounds.
- Before export, remove images (and other media) from the page Structure.
- After export, remove media entries from the
.json
(remove entire object). - After export, remove foreign key relations from the
.json
(change any"internal_link"
's tonull
). - After export, fix any snippet references (ensure desired snippet exists, then change
"snippet"
's to correct ID).
Replicate Frontera Homepage to Create Sandbox for Testing Major Changes
@tacc-wbomar, to backup instances removed by FP-1360, used this plugin to export all Article List/Preview instances (sans media) (with snippets) from https://dev.fronteraweb.tacc.utexas.edu. He performed all of the workarounds, then imported the instances to his local standalone CMS instance. When all workarounds are performed, there are no errors.
This plugins-frontera-home-2021-03-with-plugins--mod-for-import.zip includes two JSON files: one before workarounds, and one after workarounds.
High-Level Steps
- Have two independent CMS instances to test on.
- Create Text, Image, and Snippet plugin on instance A.
- Export plugins from instance A.
- Import plugins to instance B.
- ⓧ Expect failure, because of "Gotchas".
- Perform all "Workarounds" (export again if necessary).
- Import plugins to instance B.
- ✓ Expect success.
Detailed Steps
If "High-Level Steps" is too high-level, please try this instead:
- Be able to Test CMS Changes across multiple CMS instances. Both need:
-
Either this branch,
test/djangocms-transfer
. -
Or an image built from this branch,
taccwma/core-cms:e64b689
(job).
-
Either this branch,
- (On local CMS) In both CMS's docker containers, run
pip install -r requirements.txt
. - On CMS instance A, login to CMS admin.
- Create page.
- Create "Text" plugin instance.
- Create "Image" plugin instance (with uploaded image).
- Create snippet plugin instance (with a created snippet).
- Export plugins (see [djangocms-transfer README] video).
- On CMS instance B, login to CMS admin.
- Create page.
- Import plugins (see [djangocms-transfer README] video).
- ⓧ Expect failure, because of "Gotchas".
- Perform all "Workarounds" (export again if necessary).
- Ensure CMS instance B has a matching snippet.
- Import plugins.
- ✓ Expect success.
TACC ACI WMA Core-CMS Project Documentation