On Friday, April 7, 2017 at 9:48:37 AM UTC-4, Brian M wrote:
>
> Anthony, this is what I was looking for. Thanks! I am trying not to build
> the html myself and use the helpers instead. I am going for readability and
> ease of use for others to modify later. In all the examples in the book
> now
Leonel thanks for your help. I did need to put everything in the XML the
way I was doing it because otherwise it all gets escaped. But that is
because I was basically converting everything to a string first which is
not what I wanted so you were right and I was confused.
As far as why not put
Anthony, this is what I was looking for. Thanks! I am trying not to build
the html myself and use the helpers instead. I am going for readability and
ease of use for others to modify later. In all the examples in the book
nowhere did it show the append and insert for the HTML helpers I looked at
>
> htmltablebody=TBODY(TAG(XML(htmlrows)))
>
Probably you meant TAG(htmlrows) (i.e., without the XML()), but even that I
do not think will work (TAG() will not return a list of TR objects but a
parent TAG object).
However, this should work:
htmltablebody = TBODY(CAT(XML(htmlrows)))
But as n
>
> Here is my python in the controller that builds the table HTML:
>
> #these three lines are static, but in my code the looping that builds them
> is pretty complex eventually with form elements, javascript, and links
> htmlrows="row 1 descrow 1
> linka"
> htmlrows+="row 2 descrow 2
> linkb"
Yeah sometimes it's not a good idea to mix XML made stuff with the other
helpers, namely the TABLE helper tries to be convenient and put stuff that
you give it to him inside TDs if they aren't yet. If you really have to use
XML and TABLE use TAG to turn it into web2py helpers:
htmlrows="row 1 d
6 matches
Mail list logo