Pass instance context

Also POST plugin_id as a form parameter to check enable_512mb_ram
case
This commit is contained in:
PCoder 2018-10-01 07:50:15 +02:00
commit f85ef714ab
2 changed files with 4 additions and 5 deletions

View file

@ -97,9 +97,7 @@ class DCLCalculatorPlugin(CMSPluginBase):
context['templates'] = VMTemplate.objects.filter(
vm_type=instance.vm_type
).order_by('name')
context['default_selected_template'] = (
instance.default_selected_template
)
context['instance'] = instance
context['min_ram'] = 0.5 if instance.enable_512mb_ram else 1
return context