diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 98b144b4..404f3181 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -97,8 +97,7 @@ class DCLCalculatorPlugin(CMSPluginBase): context['templates'] = VMTemplate.objects.filter( vm_type=instance.vm_type ) - if instance.enable_512mb_ram: - context['enable_512mb_ram'] = True + context['min_ram'] = 0.5 if instance.enable_512mb_ram else 1 return context diff --git a/datacenterlight/templates/datacenterlight/includes/_calculator_form.html b/datacenterlight/templates/datacenterlight/includes/_calculator_form.html index bc4299ed..eed79e27 100644 --- a/datacenterlight/templates/datacenterlight/includes/_calculator_form.html +++ b/datacenterlight/templates/datacenterlight/includes/_calculator_form.html @@ -9,7 +9,7 @@ window.ssdUnitPrice = {{vm_pricing.ssd_unit_price|default:0}}; window.hddUnitPrice = {{vm_pricing.hdd_unit_price|default:0}}; window.discountAmount = {{vm_pricing.discount_amount|default:0}}; - window.enable_512mb = {{vm_pricing.enable_512mb|default:false}}; + window.minRam = {{min_ram}}; {% endif %} @@ -55,9 +55,8 @@