I just made a test

################## controller ###############

def wrapper():
    div = DIV('main wrapper',BR(),HR())
    def fun1():
        div = DIV('function2',BR(),HR())
        return locals()

    def fun2():
        div = DIV(' function 2',BR(),HR())
        return locals()

    return locals().get(request.args(0),locals())

############# controller ######################

But that does not works

when I request http://127.0.0.1:8000/testapp/default/wrapper I have the
desired return as:
<div><table><tr><td style="font-weight:bold;">div</td><td valign="top">:
</td><td><div><div>main wrapper<br /><hr /></div></div></td></tr></table>
</div>

But when I call
http://127.0.0.1:8000/testapp/default/wrapper/fun1<http://127.0.0.1:8000/testapp/default/wrapper/funcao1>
I got:
<function funcao1 at 0x8777f0c> in HTML source

How to evaluate the function ?

--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]

Reply via email to