From c7afbb32c0d8f5d237bd96e480be30a5e64077bd Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 9 Apr 2018 21:18:18 +0200 Subject: [PATCH] Add DCLCalculatorPluginModel --- datacenterlight/cms_models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 9eb55e0c..583ac6a5 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -6,6 +6,8 @@ from django.utils.safestring import mark_safe from djangocms_text_ckeditor.fields import HTMLField from filer.fields.image import FilerImageField +from datacenterlight.models import VMPricing + class CMSIntegration(models.Model): name = models.CharField( @@ -275,3 +277,12 @@ class DCLSectionPromoPluginModel(CMSPlugin): if self.background_image: extra_classes += ' promo-with-bg' return extra_classes + + +class DCLCalculatorPluginModel(DCLSectionPluginModel): + pricing = models.ForeignKey( + VMPricing, + default=VMPricing.get_default_pricing(), + help_text='Choose a pricing that will be associated with this ' + 'Calculator' + )