From 82a2014fa5b7b458b675045f5b0024c57e562d59 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 15 Apr 2018 13:34:55 +0200 Subject: [PATCH] Pass vm_pricing context from default VMPricing object --- datacenterlight/cms_plugins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 9e3376eb..9bb87bd8 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -8,7 +8,7 @@ from .cms_models import ( DCLSectionPluginModel, DCLNavbarPluginModel, DCLSectionPromoPluginModel ) -from .models import VMTemplate +from .models import VMTemplate, VMPricing @plugin_pool.register_plugin @@ -91,6 +91,8 @@ class DCLCalculatorPlugin(CMSPluginBase): context['templates'] = VMTemplate.objects.all() context['children_to_side'] = [] context['children_to_content'] = [] + context['vm_pricing'] = VMPricing.get_default_pricing() + if instance.child_plugin_instances is not None: context['children_to_content'].extend( instance.child_plugin_instances