Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from cms.plugin_base import CMSPluginBase
- from cms.plugin_news_article import plugin_news_article
- from models import ArticlePluginModel
- from django.utils.translation import ugettext as _
- class ArticlePluginPublisher(CMSPluginBase):
- model = ArticlePluginModel # model where plugin data are saved
- module = _("Aticles")
- name = _("News Article Plugin") # name of the plugin in the interface
- render_template = "djangocms_article/article_plugin.html"
- def render(self, context, instance, placeholder):
- context.update({'instance': instance})
- return context
- plugin_news_article.register_plugin(ArticlePluginPublisher) # register the plugin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement