Sean Cazzell, el s�bado 12 de noviembre a las 15:18 me escribiste:
> > So the main bit that your patch does is break out any input related
> > behavior and expose parameters into a new decorator. It's not really
> > any more verbose, it's just moving them to a new home. Seems like a
> > good idea on the surface.
> 
> Correct, all the patch does is move the validator and forminput stuff to
> a new decorator called unpack.  Unpack will always have to be the first
> decorator on your methods (currently, expose has to be first):
> 
> @turbogears.expose(html="my.template")
> ... other decorators can now go here and work! ...
> @turbogears.unpack(validators={...}, forminput="...")
> def save(self, name, address):
>     ...do something...
>     return dict(foo="bar")
> 
> I am hacking on my Paginator class and adding a decorator to it, but
> need these changes to expose to enable my decorator to work (it needs to
> be able to get at the method's return dict before it becomes HTML!).

That's exactly why my decorator was the first decorator and had to do
explicit conversions. With this decorator split is much more claner.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
Karma police
I've given all I can,
it's not enough,
I've given all I can
but we're still on the payroll.

Reply via email to