To my mind there are 2 possible approaches here: 1. Modify pyramid_simpleform so that it can use a schema generated by Colander rather than FormEncode (and in a perfect world, be able to define form widgets in that schema as well) 2. Modify Deform so that it provides pyramid_simpleform-type methods for rendering the individual parts of a form in a template.
My personal preference would be for the latter. I like Deform & Colander. I like being able to define a form schema that specifies the widget & the validation all in the one place. If you have an enterprise app with over a hundred forms, things can get messy pretty quickly :) Anyone have any tips on where you might start looking at modifying Deform to allow it to render specific form parts? -BruceC On Jan 23, 12:35 pm, Chris McDonough <[email protected]> wrote: > On Sun, 2012-01-22 at 19:59 -0500, Alex Clark wrote: > > On 1/22/12 7:54 PM, BruceC wrote: > > > Deform& Colandar is fantastic if you don't care how your form is > > > displayed in layout terms, but if you need to specify layout, there is > > > no clear way to do that. For some of us, that is the crucial > > > difference determining which forms framework to adopt. If deform had > > > some simpleform-type form field rendering methods - eg $ > > > { myform.field('foo').label() }, ${ myform.field('foo').value() }& $ > > > { myform.field('foo').errors() } - that would definitely make it a > > > more broadly functional package imho... > > > FWIW I'm using deform for fun & profit and would like to see this too. > > > Maybe mcdonc could lay out a way for us to get there, assuming someone > > wants to take on the work. > > The basic way is laid out in pyramid_simpleform right now, I think. > simpleform-style imperative form rendering using a Colander schema > rather than FormEncode. Then presumably you could share your schemas > between Deform and whatever-that-thing-gets-called. Devil's in the > details of course. > > - C -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
