On controller
from gluon.template import render
def myaction():
template = db(query).select().first().template_field
data = dict(key="value",...)
return render(template, context=data)
On terminal:
$ python web2py.py -S welcome -M
....
In [14]: from gluon.template import render
In [15]: template = "<b>Hello {{=name}}</b>"
In [16]: data = dict(name="Bruno")
In [17]: print render(template, context=data)
<b>Hello Bruno</b>
On Mon, Mar 12, 2012 at 4:08 AM, Hassan Alnatour <[email protected]
> wrote:
> Dear All ,
>
> How Can I Render HTML & CSS & Python code The are Retrieved from the
> database ?
>
>
> Best Regards ,
>
--
Bruno Rocha
[http://rochacbruno.com.br]