http://localhost:8080/?children=from turbogears import controllers, expose
class ChildRoot(controllers.RootController):
def __init__(self, k='', **kw):
self.k = k
@expose(template=“test_dinamic.templates.welcome”)
def index(self, id=1, **kw):
import time
return dict(now=time.ctime())
class Root(controllers.RootController):
@expose(template=“test_dinamic.templates.welcome”)
def index(self, children = ):
children = eval(children)
for k in children:
if not getattr(self, k, False):
setattr(self, k, ChildRoot(k))
print
import time
return dict(now=time.ctime())