From 14548b2f0158c3842bb68f422a8e6f394aa969e0 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 25 Apr 2018 17:26:31 +0530 Subject: [PATCH] flake8 refacoring --- datacenterlight/cms_plugins.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index 4c8be828..ecc0a355 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -1,4 +1,3 @@ -from cms.models.pluginmodel import CMSPlugin from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool @@ -9,7 +8,7 @@ from .cms_models import ( DCLSectionPluginModel, DCLNavbarPluginModel, DCLSectionPromoPluginModel, DCLCalculatorPluginModel ) -from .models import VMTemplate, VMPricing +from .models import VMTemplate @plugin_pool.register_plugin @@ -91,33 +90,9 @@ class DCLCalculatorPlugin(CMSPluginBase): context, instance, placeholder ) context['templates'] = VMTemplate.objects.all() - # pricing_plugin_model = None - # if instance.child_plugin_instances is not None: - # for child in instance.child_plugin_instances: - # if child.__class__.__name__ == 'DCLCustomPricingModel': - # # The second clause is just to make sure we pick up the - # # most recent CustomPricing, if more than one is present - # if (pricing_plugin_model is None or child.pricing_id > - # pricing_plugin_model.model.pricing_id): - # pricing_plugin_model = child - - # if pricing_plugin_model: - # context['vm_pricing'] = VMPricing.get_vm_pricing_by_name( - # name=pricing_plugin_model.pricing.name - # ) - # else: - # context['vm_pricing'] = VMPricing.get_default_pricing() return context -# @plugin_pool.register_plugin -# class DCLCustomPricingPlugin(CMSPluginBase): -# module = "Datacenterlight" -# name = "DCL Custom Pricing Plugin" -# model = DCLCustomPricingModel -# render_plugin = False - - @plugin_pool.register_plugin class DCLBannerListPlugin(CMSPluginBase): module = "Datacenterlight"