Em Tuesday 22 January 2008 01:27:56 Catherine Devlin escreveu:
> Success!
>
> On Jan 21, 2008 3:50 PM, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> > Try:
> >
> > @validate(form=myForm, error_handler=ask)
>
> Well, this doesn't work in tg2:
>
>     @validate(form=myForm, error_handler=ask)
>
>   File "/home/catherine/tg2/val/val/controllers/root.py", line 20, in
> RootController
>     @validate(form=myForm, error_handler=ask)
> TypeError: __init__() got an unexpected keyword argument 'form'
>
> (which is why I went poking around for alternate syntaxes, eventually
> trying the validators=myForm.validators)
>
> But, it turns out that if I call it like this:
>
>     @validate(myForm, error_handler=ask)
>
> ... it works!  Error messages and everything, like it's supposed to.

I'd say that not accepting the "form" keyword is a bug.  Can you open a 
ticket?


-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to