From 9a57c3341e340c515a741359f623c0bd6e42718a Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 23 Mar 2018 01:27:51 +0530 Subject: [PATCH] sectioniconplugin placement fix --- datacenterlight/cms_plugins.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 42e8719f..40f3c098 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -31,8 +31,12 @@ class DCLSectionPlugin(CMSPluginBase): context['children_to_right'] = [] context['children_to_left'] = [] if instance.child_plugin_instances is not None: + right_children = [ + 'DCLSectionImagePluginModel', + 'DCLSectionIconPluginModel' + ] for child in instance.child_plugin_instances: - if child.__class__.__name__ == 'DCLSectionImagePluginModel': + if child.__class__.__name__ in right_children: context['children_to_right'].append(child) else: context['children_to_left'].append(child)