Yep, I contributed some fixes to the Wareweb unpack (in SVN) and now am
hacking on TurboGears unpack.  I stole the name for lack of better ideas
(and thoughts of making TG unpack a bit more like Wareweb unpack).

I think it is probably a good idea to use Wareweb-style coercers instead
of FormEncode validators in turbogears.unpack and would be willing to
submit a patch if Kevin is interested in making the switch.

Wareweb and Paste is awesome, I hope to do what I can to get TG using
more of it!  I have been kicking around the idea of porting CherryPy to
Paste (as Ian has done with Webware) so we could run TurboGears
completely on top of Paste and take advantage of all the great code Ian
has in there (the debugging webcast on Ian's blog should convince
anyone).


Sean Cazzell



On Sat, 2005-11-12 at 13:31 -0600, Ian Bicking wrote:
> Sean Cazzell wrote:
> > @expose(template="myproject.templates.foo")
> > @unpack(... validators and inputform stuff here ...)
> > def foo(bar):
> >     ...
> 
> Anyway, just because @unpack looks so familiar to me, I thought I'd note
> a decorator I wrote for unpacking fields and doing some conversions.
> It's simpler than validators, for cases when you are getting
> server-generated content back and don't expect errors.
> 
> http://svn.pythonpaste.org/Paste/Wareweb/trunk/wareweb/packing.py
> http://pythonpaste.org/wareweb/module-wareweb.packing.html#unpack
> 

Reply via email to