As I've said, the widgets are there, trust me :)

It's just w.all_widgets is a set of the "registered" widgets, that is,
the ones a WidgetsDescription has been created for the for display at
the widget browser (that's why they end in Desc). They no longer
register themselves automatically like the old API did. Try this:

>>> from turbogears import widgets as W
>>> options = [(a,a) for a in xrange(10)]
>>> W.SingleSelectField(name="select", options=options).render()
'<SELECT CLASS="singleselectfield" NAME="select" ID="select">\n
   <OPTION VALUE="0">0</OPTION><OPTION VALUE="1">1</OPTION><OPTION
VALUE="2">2</OPTION><OPTION VALUE="3">3</OPTION><OPTION
VALUE="4">4</OPTION><OPTION VALUE="5">5</OPTION><OPTION
VALUE="6">6</OPTION><OPTION VALUE="7">7</OPTION><OPTION
VALUE="8">8</OPTION><OPTION VALUE="9">9</OPTION>\n    </SELECT>'

Your best bet right now to see all available widgets is to:
import turbogears.widgets as widgets
dir(widgets)

:) Hope it helps
Alberto

Reply via email to