On Apr 19, 2010, at 7:27 PM, cd34 wrote:
> I looked at that, but, when you're developing a webapp that has 315
> forms, that lack of automation seems to fly in the face of why I chose
> a framework.
Framework's don't automate programming for the web, they provide a structure
around it. Frameworks and libraries provide structure and streamline common
tasks. The reason the form generation field is so full of various form
libraries is that most people have very specific needs. Even those trying to
automate it all generally take different approaches geared towards how they
need to solve it.
> I don't really mind that my forms look the same and
> ToscaWidget's TableForm is somewhat passable in terms of graphic
> style, but, there is quite a bit of voodoo behind it that I haven't
> delved into. I suppose if I had to write a few page webapp, Mike
> Bayer's method would be very workable. There are times when I feel
> constrained by a schema generated form, but, there's no reason I can't
> rewrite the template or rewrite the form. One particular page I had
> to code by hand and that method does look a bit more workable than the
> method I ended up using.
I guess I'm still confused why writing a few lines to use a few bits on a form
is so 'hard' that I need to write a bunch of Python code to have it done for
me. Is it really that tough to put a line of Mako in a form like so:
<%form:textarea name="code"/>
Such that its much easier to go and write a toscawidgets schema and add:
class SomeForm:
code = forms.TextArea()
If you know how you want the form laid out, with a table, the method Mike shows
is easy to extend to do so if you know Mako. And again, you'd have more
control, and re-use that applies directly to your use-case, rather than
attempting to force some other tool to bend to your will.
I write quite a bit of forms, the approach is very fast and the time saved by
never having to hack away at some tool that goes through various layers of
indirection and magic to auto-generate things for me has saved waaaaay more
time than typing a little extra now and then.
But given that, I can still understand your use-case, I rarely write forms that
match directly to a single table of a schema, or a single row in a table. The
apps I work on generally manipulate data that might be in multiple tables, so
no schema-based form gen tool would be of any use to me. Since you do however
generate forms directly from schema's, I'd recommend FormAlchemy which was
created for that very purpose.
Cheers,
Ben
--
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.