I am not sure this should have ever worked. I think you want:
result = DIV() #### <---
result.append ( H2('hello') )
result.append ( IMG ( _src="../static/images/" + parts[1], _align =
'left' ))
result.append ( H1('world') )
result.append ( H1('world') )
result.append ( H1('world') )
response.content = result
and
{{=response.content}}
On Nov 27, 4:16 pm, Stef Mientki <[email protected]> wrote:
> hello,
>
> probably this sounds very weird, my program worked great, but after changing
> a few unimportant words
> it didn't anymore.
>
> In a controller, I build a list of html elements and assigned it to
>
> Result = []
> Result.append ( H2('hello') )
> Result.append ( IMG ( _src="../static/images/" + parts[1], _align = 'left'
> ))
> Result.append ( H1('world') )
> Result.append ( H1('world') )
> Result.append ( H1('world') )
> response.Content = Result
>
> I displayed it with the following lines in the viewer
>
> {{=response.Content or 'No Content'}}
>
> and it worked perfect,
> i.e. the 3 lines of text 'world' were neatly placed next to the image on the
> right.
>
> Suddenly it stopped working, and instead of the content, the list objects
> were displayed, like here
> (a simpeler list)
>
> [<gluon.html.H2 object at 0x040DACB0>, <gluon.html.H1 object at 0x040DA430>]
>
> So I realized, I needed "BEAUTIFY", but I'm absolutely sure I didn't use
> BEAUTIFY before !!
> and indeed after using BEAUTIFY, the content was displayed again,
> but my text around images is totally gone :-(
>
> How could my program worked before ???
>
> And of course more important, how can I get my text around the image ?
>
> thanks,
> Stef Mientki