This applies also to the @validate decorator, right?

Ciao
Michele

PS
Why many people are still using @expose and not @validate for forms and
validators? :D

Simon Belak wrote:
> Hi,
>
> as of r701 methods using validators have to declare an error handler in
> some way. This can be done either by adding parameter tg_errors to each
> method or using controllers.error_handler decorator.
>
>      @expose(validators={...})
>      def foo(self, baz="", bar="")
>         ...
>
> should therefore be changed to
>
>      @expose(validators={...})
>      @error_handler()
>      def foo(self, baz="", bar="")
>         ...
>
> or
>
>      @expose(validators={...})
>      def foo(self, baz="", bar="", tg_errors=None)
>         ...
>
> For further examples see turbogears/tests/test_errorhandling.py or
> ticket #258 [1] and fear not, proper documentation is on the way. ;)
>
>
> Cheers,
> Simon
> 
> [1] http://trac.turbogears.org/turbogears/ticket/258

Reply via email to