If you want to convert only data gathered as arguments a nice solution would be to exitend formencode.FancyValidator[1].
It's rearly prudent to put such strictly utility functions into the controller.
[1] http://formencode.org/Validator.html#writing-your-own-validator Simon jemptython wrote:
I'm new to TurboGears so I'm looking for a little guidance as to "best practice". I want to create a method to convert a string to a one-item list. Specifically when that string is returned from checkboxes and/or multiple selects. My first question is, might it be a good idea to implement this conversion from a class method of the Root object as found in controllers.py? As an adjunct to this, is there already a method, perhaps in CherryPy, that will perform this string-to-one-item-list for me? TIA George

