removed unused header plugins

This commit is contained in:
Arvind Tiwari 2018-01-05 18:31:24 +05:30
parent 554335ae19
commit 3ef2aa4bfb
3 changed files with 67 additions and 120 deletions

View file

@ -3,11 +3,10 @@ from cms.plugin_pool import plugin_pool
from .models import (
UngelichContactUsSection, UngelichTextSection, Service, ServiceItem,
About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader,
UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer,
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader,
About, AboutItem, SectionWithImage, UngleichServiceItem,
UngleichProductItem, UngleichProduct, UngleichCustomer,
UngleichCustomerItem, UngleichHTMLOnly,
UngleichHeaderWithBackgroundImageSlider,
UngleichHeaderWithBackgroundImageSliderItem,
UngleichHeaderWithBackgroundVideoSliderItem,
)
@ -184,49 +183,6 @@ class UngleichServicesItemPlugin(CMSPluginBase):
return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImagePlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Plugin"
model = UngleichSimpleHeader
render_template = "ungleich_page/ungleich/header.html"
cache = False
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImageSliderPlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Slider Plugin"
model = UngleichHeader
render_template = "ungleich_page/ungleich/header_with_slider.html"
cache = False
allow_children = True
child_classes = ['UngleichHeaderItemPlugin']
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderItemPlugin(CMSPluginBase):
name = "ungleich Header Item Plugin"
model = UngleichHeaderItem
render_template = "ungleich_page/ungleich/_header_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichHeaderWithTextAndImageSliderPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichHeaderItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase):
name = "ungleich Header with Background and Image Slider Plugin"
@ -237,7 +193,6 @@ class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase):
cache = False
allow_children = True
child_classes = [
'UngleichHeaderBackgroundImageAndTextItemPlugin',
'UngleichHeaderBackgroundVideoItemPlugin',
]
@ -263,25 +218,6 @@ class UngleichHeaderBackgroundVideoItemPlugin(CMSPluginBase):
return context
@plugin_pool.register_plugin
class UngleichHeaderBackgroundImageAndTextItemPlugin(CMSPluginBase):
name = "ungleich Header with Background and Image and Text Item Plugin"
model = UngleichHeaderWithBackgroundImageSliderItem
render_template = (
'ungleich_page/ungleich/_header_with_background_image_slider_item.html'
)
cache = False
require_parent = True
parent_classes = ['UngleichHeaderBackgroundImageAndTextSliderPlugin']
def render(self, context, instance, placeholder):
context = super(
UngleichHeaderBackgroundImageAndTextItemPlugin, self
).render(context, instance, placeholder)
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichProductsPlugin(CMSPluginBase):
name = "ungleich Products Plugin"

View file

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-01-05 12:56
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0017_auto_20171219_1856'),
]
operations = [
migrations.RemoveField(
model_name='ungleichheader',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichheader',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichheaderitem',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichheaderitem',
name='image',
),
migrations.RemoveField(
model_name='ungleichheaderwithbackgroundimageslideritem',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichheaderwithbackgroundimageslideritem',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='image',
),
migrations.DeleteModel(
name='UngleichHeader',
),
migrations.DeleteModel(
name='UngleichHeaderItem',
),
migrations.DeleteModel(
name='UngleichHeaderWithBackgroundImageSliderItem',
),
migrations.DeleteModel(
name='UngleichSimpleHeader',
),
]

View file

@ -98,63 +98,10 @@ class UngleichServiceItem(ServiceItem):
)
class UngleichSimpleHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_background_image",
on_delete=models.SET_NULL
)
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_image",
on_delete=models.SET_NULL
)
text = HTMLField()
class UngleichHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_background_image",
on_delete=models.SET_NULL
)
carousel_data_interval = models.IntegerField(default=5000)
class UngleichHeaderWithBackgroundImageSliderItem(CMSPlugin):
background_image = FilerImageField(
null=True, blank=True,
related_name="ungleich_header_slider_item_image",
on_delete=models.SET_NULL
)
description = HTMLField(
default='<div class="intro-cap">We Design, Configure &amp; Maintain '
'<br>Your Linux Infrastructure</div><p class="intro_lead">'
'Ruby on Rails, Django, Java, Webserver, Mailserver, any '
'infrastructure that needs to configured, we provide '
'comprehensive solutions. Amazon, rackspace or bare metal '
'servers, we configure for you.</p><p style="text-align: '
'right;"><a class="btn btn-trans" href="">Learn More</a></p>'
)
class UngleichHeaderWithBackgroundImageSlider(CMSPlugin):
carousel_data_interval = models.IntegerField(default=2000)
class UngleichHeaderItem(CMSPlugin):
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_item_image",
on_delete=models.SET_NULL
)
description = HTMLField()
class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin):
image = FilerImageField(
null=True,