Hi Don, Glad you like TurboGears!
The problem with the Invalid signature is already fixed in svn (and validation is undergoing some changes anyhow). The assert_string problem is fixed in FormEncode's svn. So, both of these fixes should get into the next TurboGears release. Kevin On 11/2/05, Don Hopkins <[EMAIL PROTECTED]> wrote: > > > > I'm using TurboGears and its associated entourage of python modules for a > couple of different projects, and I love it! > > I've read over the code and I'm really happy with how well it's all > designed. > > Elegant, amazing stuff that fits together very well! > > I'd like to help out debugging and developing it. > > > > Here's a description of a wee problem I'm having with FormEncode: > > > > I installed latest TurboGears 0.8a4, which installed FormEncode rev 1104 > > > > Couldn't get FormEncode's validators.DateConverter to work, because it was > trying to call assert_string, which should have been defined in > FancyValidator, but wasn't. > > > > So I upgraded to the latest FormEncode rev 1182, which had assert_string. > > > > That fixed the problem with assert_string being undefined, but led to other > problems. > > > > When I submitted my form with a date in the form of "2005-11-01 19:32:55", > and it caused a (handled) validation error (although I think it should have > validated correctly, but it failed to match _day_date_re). > > > > The validation error was not being handled by TurboGears correctly, because > turbogear's controllers.py tries to go "raise > turbogearsvalid.Invalid(str(errors))", which causes an error "TypeError: > __init__() takes at least 4 arguments (2 given)" because the > Invalid.__init__ method from formencode's api.py expects 4 required args > "self, msg, value, state, error_list=None, error_dict=None". > > > > In summary, I think TurboGears needs to be updated to use the latest version > of FormEncode, and fixed to call the Invalid constructor with the right > arguments including msg, value and state. (value and state currently > missing). Also, I think FormEncode's DateConverter should accept dates in > the form "2005-11-01 19:32:55", which is how they print out form Python by > default. > > > > -Don > > > > -- Kevin Dangoor Author of the Zesty News RSS newsreader email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com

