Source

cmsplugin-tabslider / cmsplugin_tabslider / cms_plugins.py

Full commit
Konrad Rymczak 32940f4 























# -*- coding: utf-8 -*-
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
import models
import admin

class CMSTabSliderPlugin(CMSPluginBase):
    module = "Filer"
    model = models.TabSlider
    name = _("TabSlider")
    render_template = "cmsplugin_tabslider/tabslider.html"
    admin_preview = False
    #inlines = [admin.TabInline]

    def render(self, context, instance, placeholder):
        context.update({
            'context': context,
            'instance': instance,
            'tabs': instance.tabs.all(),
            'placeholder': placeholder,
        })
        return context

plugin_pool.register_plugin(CMSTabSliderPlugin)