> How about providing render() for rendering with tables and
> render_css() for rendering with labels?

I think that would be perfect.


    def render(self):
        out = []
        out.append(self.rendernote(self.note))
        out.append('<table>\n')
        for i in self.inputs:
            out.append('<tr><th><label for="%s">%s</label></th><td>' %
(i.id, net.websafe(i.description)))
            out.append(i.pre)
            out.append(i.render())
            out.append(i.post)
            out.append('</td></tr>\n')
        out.append('</table>')
        return ''.join(out)


    def render_css(self):
        out = []
        out.append(self.rendernote(self.note))
        for i in self.inputs:
            out.append('<label for="%s">%s</label>' % (i.id,
net.websafe(i.description)))
            out.append(i.pre)
            out.append(i.render())
            out.append(i.post)
            out.append('\n')
        return ''.join(out)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to