Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. from cms.plugin_base import CMSPluginBase
  2. from cms.plugin_news_article import plugin_news_article
  3. from models import ArticlePluginModel
  4. from django.utils.translation import ugettext as _
  5.  
  6.  
  7. class ArticlePluginPublisher(CMSPluginBase):
  8. model = ArticlePluginModel # model where plugin data are saved
  9. module = _("Aticles")
  10. name = _("News Article Plugin") # name of the plugin in the interface
  11. render_template = "djangocms_article/article_plugin.html"
  12.  
  13. def render(self, context, instance, placeholder):
  14. context.update({'instance': instance})
  15. return context
  16.  
  17. plugin_news_article.register_plugin(ArticlePluginPublisher) # register the plugin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement