Source

cmsplugin-poll / cmsplugin_poll / cms_plugins.py

Full commit
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_poll.models import PollPlugin
from django.utils.translation import ugettext as _


class CMSPollPlugin(CMSPluginBase):
    model = PollPlugin
    name = _("Simple poll")
    render_template = "cmsplugin_poll/detail.html"

    def render(self, context, instance, placeholder):
        context['poll'] = instance.poll
        return context

plugin_pool.register_plugin(CMSPollPlugin)