sectioniconplugin placement fix

This commit is contained in:
Arvind Tiwari 2018-03-23 01:27:51 +05:30
parent 414b783983
commit 9a57c3341e

View file

@ -31,8 +31,12 @@ class DCLSectionPlugin(CMSPluginBase):
context['children_to_right'] = [] context['children_to_right'] = []
context['children_to_left'] = [] context['children_to_left'] = []
if instance.child_plugin_instances is not None: if instance.child_plugin_instances is not None:
right_children = [
'DCLSectionImagePluginModel',
'DCLSectionIconPluginModel'
]
for child in instance.child_plugin_instances: 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) context['children_to_right'].append(child)
else: else:
context['children_to_left'].append(child) context['children_to_left'].append(child)