Pass vm_pricing context from default VMPricing object
This commit is contained in:
parent
74393ac6ac
commit
82a2014fa5
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,7 @@ from .cms_models import (
|
||||||
DCLSectionPluginModel, DCLNavbarPluginModel,
|
DCLSectionPluginModel, DCLNavbarPluginModel,
|
||||||
DCLSectionPromoPluginModel
|
DCLSectionPromoPluginModel
|
||||||
)
|
)
|
||||||
from .models import VMTemplate
|
from .models import VMTemplate, VMPricing
|
||||||
|
|
||||||
|
|
||||||
@plugin_pool.register_plugin
|
@plugin_pool.register_plugin
|
||||||
|
@ -91,6 +91,8 @@ class DCLCalculatorPlugin(CMSPluginBase):
|
||||||
context['templates'] = VMTemplate.objects.all()
|
context['templates'] = VMTemplate.objects.all()
|
||||||
context['children_to_side'] = []
|
context['children_to_side'] = []
|
||||||
context['children_to_content'] = []
|
context['children_to_content'] = []
|
||||||
|
context['vm_pricing'] = VMPricing.get_default_pricing()
|
||||||
|
|
||||||
if instance.child_plugin_instances is not None:
|
if instance.child_plugin_instances is not None:
|
||||||
context['children_to_content'].extend(
|
context['children_to_content'].extend(
|
||||||
instance.child_plugin_instances
|
instance.child_plugin_instances
|
||||||
|
|
Loading…
Reference in a new issue