# returns the html code for that plugin
# in essence, wraps the results of self.render_content ()
- def render (self):
+ def render (self, request):
uuid = self.uuid
title = self.get_class()
- plugin_content = self.render_content ()
+ plugin_content = self.render_content (request)
# xxx missing from the php version
# compute an 'optionstr' from the set of available settings/options as a json string
# that gets passed to jquery somehow
# see the bottom of
- result = render_to_string ('plugin-wrap.html',
+ result = render_to_string ('widget-plugin.html',
{'uuid':uuid, 'title':title,
'visible':self.is_visible(),
'hidable':self.is_hidable(),
return result
+ ### abstract interface
+ def render_content (self, request):
+ """Should return an HTML fragment"""
+ return "Your plugin needs to redefine 'render_content(self, request)'"