From ed511785eaae8fe59bbd9e64bc279783e957b027 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 11 Apr 2013 08:35:19 +0200 Subject: [PATCH] title not mandatory in a plugin --- unfold/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.0