Source

Ochs / ochs_media / cms_plugins.py

Full commit
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from ochs_media.models import MainStoryPlugin

class OchsMainStoryPlugin(CMSPluginBase):
    model = MainStoryPlugin
    name = "Lead Story"
    render_template = "news/lead_story.html"
    admin_preview = False
 
    def render(self, context, instance, placeholder):
        context.update(dict(
            story=instance.story,
            photo=instance.photo,
            object=instance,
            placeholder=placeholder
        ))
        return context
plugin_pool.register_plugin(OchsMainStoryPlugin)