def render(self, element=None): Widget.render(self) f = Kitchen(self.get_form().get_widget_template_dirs(), self.get_form().get_widget_template_extensions()) f = f.get("select") if f: t = Template(filename=f) return t.render(**self.export()) return u''
def render(self, markup=None): Widget.render(self) f = Kitchen(self.get_form().get_widget_template_dirs(), self.get_form().get_widget_template_extensions()) f = f.get('password') if f: t = Template(filename=f) return t.render(**self.export()) return u''
def export(self): desc = Widget.export(self) desc["options"] = self.options return desc
def __init__(self, *argc, **argv): self.options = argv.get("options", {}) if 'options' in argv: del argv['options'] Widget.__init__(self, *argc, **argv)
def export(self): desc = Widget.export(self) desc["size"] = self.size desc["readonly"] = self.readonly return desc
def __init__(self, *argc, **argv): for key in ('size', 'readonly'): setattr(self, key, argv.get(key, getattr(self, key))) if key in argv: del argv[key] Widget.__init__(self, *argc, **argv)
def export(self): desc = Widget.export(self) desc['cols'] = self.cols desc['rows'] = self.rows desc['readonly'] = self.readonly return desc
def set_form(self, form): Widget.set_form(self, form) form.attr("enctype", "multipart/form-data")
def export(self): desc = Widget.export(self) desc["path"] = self.path return desc
def __init__(self, *argc, **argv): self.path = argv.get('path', self.path) if "path" in argv: del argv["path"] Widget.__init__(self, *argc, **argv)