Skip to content

Instantly share code, notes, and snippets.

Žan Anderle zanderle

Block or report user

Report or block zanderle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zanderle
zanderle / migration-plan-pseudo-code.py
Created Feb 4, 2016
Plan for script to migrate a page from DjangoCMS Cascade to Aldryn Bootstrap plugin
View migration-plan-pseudo-code.py
# 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
You can’t perform that action at this time.