5 messages in com.googlegroups.pylons-discussRe: Genshi-specific validate decorato...
FromSent OnAttachments
Shannon -jj Behrens27 Oct 2006 13:42 
Pedro Algarvio, aka, s0undt3ch27 Oct 2006 14:02 
Shannon -jj Behrens30 Oct 2006 23:46 
Ben Bangert31 Oct 2006 11:30 
Ian Bicking31 Oct 2006 11:33 
Subject:Re: Genshi-specific validate decorator (was: Formencode - Form fields with multiple values)
From:Shannon -jj Behrens (jjin@public.gmane.org)
Date:10/30/2006 11:46:10 PM
List:com.googlegroups.pylons-discuss

Yep, we're all heading down pretty much the same path. I'd just really like to see us all ending up with the same code instead of each having our own separate forks of this code. That means that some part of this stuff belongs in either Genshi or Pylons, unless I'm just confused.

Happy Hacking :) -jj

On 10/27/06, Pedro Algarvio, aka, s0undt3ch
<ufs-beLbHzoLccIdnm+yROf@public.gmane.org> wrote:

Well, this realy ain't as optiomal as formencode's htmlfill since what I do to correctly position the errors is re-parse the template. This means the template needs to be parsed twice, one to render initially and another one to include the errors.

The development version of Genshi now includes HTMLFormFiller which does what htmlfill does but for python, but. we can only pass one dict. either we pass the form_result or we pass form_errors, so still not optimal. We can also use match macros to help out.

Matt Good's approach:

http://groups.google.com/group/genshi/browse_thread/thread/5979759760e24427/# <- see matt_good post And his validate decorator version: http://paste.lisp.org/display/28756 <- by matt_good

Now, about the inclusion of this decorator into Pylons, dunno, and the devs must answer that.