Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zanderle's full-sized avatar

Žan Anderle zanderle

View GitHub Profile
@zanderle
zanderle / migration-plan-pseudo-code.py
Created February 4, 2016 15:28
Plan for script to migrate a page from DjangoCMS Cascade to Aldryn Bootstrap plugin
# Usecase: I have a DjangoCMS website with content and everything. It is using DjangoCMS Cascade plugin and I'd like
# to start using Aldryn Bootstrap plugin. I'd like to have a script that migrates all my content from one plugin to
# the other, since I don't want to do manually.
# Assuming aldryn_bootstrap is already installed
# The hard part is to deal with Grid elements, because it has multiple levels. Other stuff (like buttons) can just be replaced
for container_plugin in all_bootstrap_containers_plugins:
for row_plugin in container_plugin.get_children().filter(row_plugin=True).order_by(position):
# Create left sibling of container_plugin