To use it:
easy_install xcbl
- In your controller.py,
from xcbl.widgets import ExtensibleCheckBoxList
- In your form's WidgetsList,
pets = ExtensibleCheckBoxList(options=['cats','dogs','turtles'])
(exactly the same as you would for an ordinary CheckBox List widget)
Unfortunately, the new items will appear beneath the "Other:" box, not above it, unless you upgrade your MochiKit to 1.4. Details on how to do that and more are here.
Developing it was lots of fun - it really shows how easily a relative amateur can contribute to TurboGears. I hope to write up a "Developing and Contributing TurboGears Widgets for Dummies" document soon, based on the experience.
No comments:
Post a Comment