2 from turbogears import url
3 from turbogears.controllers import Controller
6 def __init__(self, base):
7 # Armo la lista de subcontrollers
8 self.items = filter(lambda i: isinstance(getattr(base, i), Controller), base.__dict__)
12 option = u"""<option value="%s">%s</option>" """
16 <select OnChange="window.location=this.options[this.selectedIndex].value;">
23 s += option % (url('/' + i), i.capitalize().replace('_', ' '))