flake8 refacoring
This commit is contained in:
parent
91a65e88ec
commit
14548b2f01
1 changed files with 1 additions and 26 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue