Update cms_plugins.py
This commit is contained in:
		
					parent
					
						
							
								4e3211b62f
							
						
					
				
			
			
				commit
				
					
						1e97d0ba38
					
				
			
		
					 1 changed files with 4 additions and 6 deletions
				
			
		|  | @ -89,10 +89,12 @@ class DCLCalculatorPlugin(CMSPluginBase): | ||||||
|             context, instance, placeholder |             context, instance, placeholder | ||||||
|         ) |         ) | ||||||
|         context['templates'] = VMTemplate.objects.all() |         context['templates'] = VMTemplate.objects.all() | ||||||
|         context['children_to_side'] = [] |  | ||||||
|         context['children_to_content'] = [] |         context['children_to_content'] = [] | ||||||
|         pricing_plugin_model = None |         pricing_plugin_model = None | ||||||
|         if instance.child_plugin_instances: |         if instance.child_plugin_instances is not None: | ||||||
|  |             context['children_to_content'].extend( | ||||||
|  |                 instance.child_plugin_instances | ||||||
|  |             ) | ||||||
|             for child in instance.child_plugin_instances: |             for child in instance.child_plugin_instances: | ||||||
|                 if child.__class__.__name__ == 'DCLCustomPricingModel': |                 if child.__class__.__name__ == 'DCLCustomPricingModel': | ||||||
|                     # The second clause is just to make sure we pick up the |                     # The second clause is just to make sure we pick up the | ||||||
|  | @ -108,10 +110,6 @@ class DCLCalculatorPlugin(CMSPluginBase): | ||||||
|         else: |         else: | ||||||
|             context['vm_pricing'] = VMPricing.get_default_pricing() |             context['vm_pricing'] = VMPricing.get_default_pricing() | ||||||
| 
 | 
 | ||||||
|         if instance.child_plugin_instances is not None: |  | ||||||
|             context['children_to_content'].extend( |  | ||||||
|                 instance.child_plugin_instances |  | ||||||
|             ) |  | ||||||
|         return context |         return context | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue