From: Thierry Parmentelat Date: Thu, 11 Apr 2013 06:35:19 +0000 (+0200) Subject: title not mandatory in a plugin X-Git-Tag: myslice-0.2-1~165 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ed511785eaae8fe59bbd9e64bc279783e957b027;p=unfold.git title not mandatory in a plugin --- diff --git a/unfold/plugin.py b/unfold/plugin.py index f9e1ea41..ddba40b4 100644 --- a/unfold/plugin.py +++ b/unfold/plugin.py @@ -65,13 +65,14 @@ class Plugin: # p=Plugin(foo='bar') # which will result in 'foo' being accessible to the template engine # - def __init__ (self, page, title, domid=None, + def __init__ (self, page, title=None, domid=None, visible=True, togglable=None, toggled=None, **settings): self.page = page self.title=title # callers can provide their domid for css'ing if not domid: domid=Plugin.newdomid() self.domid=domid + if not title: title="Plugin title for %s"%domid self.classname=self._py_classname() self.plugin_classname=self._js_classname() self.visible=visible