Dan Jacob a écrit :
> +1 for the SQLObject style of form declaration. I don't like the
> "fields" class though; maybe you can have the option to set the "name"
> attribute if needed.
>
>

SQLObject style is good for flat structure like RDBMS, widgets are more 
hierarchical:

myform = TableForm(name="myform", widgets=[
        FieldSet(name="g1", widgets=[
                TextField("fieldA",....),
                TextField("fieldB",....),
        ]),
        FieldSet(name="g2", widgets=[
                TextField("fieldC",....),
                TextField("fieldD",....),
        ]),
])

(Hum it looks like the dark-side of template), may be a third syntax is 
possible : the callable

myform = TableForm(name="myform",)(
        FieldSet(name="g1")(
                TextField("fieldA",....),
                TextField("fieldB",....),
        ),
        FieldSet(name="g2")(
                TextField("fieldC",....),
                TextField("fieldD",....),
        ),
)



--
--------------------------------------------------------------
David "Dwayne" Bernard            Freelance Developer

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to