Joris wrote:
> Hi all,
>
>
> This is probably an obvious and/or stupid question since I'm not a
> Programmer by any measure, but please bear with me.
>
>
> I start a TG project and define a nice model.
> Then I find myself repeating much of the model for the widgets/forms. So
> much, that I've started doing copy/pastes.
>
> Is there no way to automate the conversion between sqlobject-properties
> (with added validators) to forms?
> It would be nice to say FormAlize(Somesqlobject) and not bother with it
> again?
>

Install FastData and use formmaker.fields_for:

http://trac.turbogears.org/turbogears/browser/projects/FastData/trunk/tgfastdata/formmaker.py#L124

Example:

from model import Page

fields_list = fields_for(Page)

And you're done. ;-)

Ciao
Michele


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to