Удалил мусор

master
Alexander Kondratyev 9 years ago
parent 1adcf709bd
commit d3de610a10
  1. 59
      promo/cms_plugins.py
  2. 7
      promo/migrations/0001_initial.py

@ -29,62 +29,3 @@ class PromoPluginPublisher(CMSPluginBase):
return context
plugin_pool.register_plugin(PromoPluginPublisher) # register the plugin
# from django.utils.translation import ugettext_lazy as _
# from cms.models.pluginmodel import CMSPlugin
# from cms.plugin_base import CMSPluginBase
# from cms.plugin_pool import plugin_pool
# from .models import ContextServicePlugin
# from .forms import ContextServiceForm
# from .settings import get_setting
# class SevicePlugin(CMSPluginBase):
# module = 'Sevice'
# class SeviceContextPlugin(SevicePlugin):
# """
# Non cached plugin which returns the latest posts taking into account the
# user / toolbar state
# """
# render_template = 'sevice/plugins/context_services.html'
# name = _('Context Services')
# model = ContextServicePlugin
# form = ContextServiceForm
# filter_horizontal = ('categories',)
# cache = False
# def render(self, context, instance, placeholder):
# context = super(SeviceContextPlugin, self).render(context, instance, placeholder)
# context['services_list'] = instance.get_services(context['request'])
# if instance.categories.exists():
# context['category'] = instance.categories.all()[0].slug
# else:
# context['category'] = "all"
# return context
# class SeviceContextPluginCached(SevicePlugin):
# """
# Cached plugin which returns the latest published posts
# """
# render_template = 'sevice/plugins/context_services.html'
# name = _('Context Services')
# model = ContextServicePlugin
# form = ContextServiceForm
# filter_horizontal = ('categories',)
# def render(self, context, instance, placeholder):
# context = super(SeviceContextPluginCached, self).render(context, instance, placeholder)
# context['posts_list'] = instance.get_posts()
# return context
# plugin_pool.register_plugin(SeviceContextPlugin)

@ -8,11 +8,6 @@ import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('cms', '0014_auto_20160404_1908'),
]
operations = [
migrations.CreateModel(
name='Promo',
@ -24,7 +19,7 @@ class Migration(migrations.Migration):
options={
'abstract': False,
},
bases=(parler.models.TranslatableModelMixin, models.Model),
bases=(models.Model,),
),
migrations.CreateModel(
name='PromoTranslation',

Loading…
Cancel
Save