I've got the concerns of forms generation and validation when you have
lot of fields.

I've not used the Widgets mainly because they were not yet well defined
;-(.

I'm using FormEncode functionalities called htmlfill to fill-in the
form, validate it and
display errors.

For facility, I consolidate all forms (and their validators) in a
separeted file: forms.py.
The Forms can be adapted, and modifed by the designers.
I've added the possibility to add variables (simple standard
substitution).

Because writing those forms, the validators and the associated
controllers.py is tedious,
I've made a simple script that build all of them directly from the
model.py.

If you want to see it, check:
- generate.py (that generate the forms.py, the controlers.py and even
simplified Kid files for Add, Edit and view.
- master_template.py: a cheetah template that will create the
controlers.py
- master_forms.py: a cheetah template that will create the forms.py
(the template for kid files is in the generate.py file).

The 3 files reside here:
http://projectsmgt.opensource4you.org/ProjectsMgt/browser/trunk/

William

---
http://www.opensource4you.com

Reply via email to