From d3de610a10326f54d01b6c4ad77de7a37a817bdf Mon Sep 17 00:00:00 2001 From: Alexander Kondratyev Date: Wed, 22 Feb 2017 14:24:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D0=BC?= =?UTF-8?q?=D1=83=D1=81=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- promo/cms_plugins.py | 59 -------------------------------- promo/migrations/0001_initial.py | 7 +--- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/promo/cms_plugins.py b/promo/cms_plugins.py index 45c09bd..e1f9d23 100644 --- a/promo/cms_plugins.py +++ b/promo/cms_plugins.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) diff --git a/promo/migrations/0001_initial.py b/promo/migrations/0001_initial.py index e316032..89809ba 100644 --- a/promo/migrations/0001_initial.py +++ b/promo/migrations/0001_initial.py @@ -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',