I think you want render.  For example:

from gluon.template import render
fields=Storage()
fields.first_name = "John"
content = "Hello {{=first_name}}"
rendered = render(content, context=fields)


On Nov 2, 9:02 am, lucas <sjluk...@gmail.com> wrote:
> ok, still stuck,
>
> i played with CODE(...) but that only displays the text in python or
> web2py syntax, it doesn't run it.  i tried exec("string"), like in the
> web2py manual, under a function in index.py, but it failes to compile
> on that line saying invalid syntax.
>
> so i am still not sure, so how does view get processed and separated
> by html and python code and then the python code is interpreted and
> run as executable code?
>
> thank you in advance, lucas

Reply via email to