Sorry for the deluge of questions, I'm trying to master everything
turbogears has to offer. I'm playing with form widgets now, very nice.
It's unclear to me, however, how to initialize a form with values from a
model object. For instance, I'm working on using the form widgets to build
an admin controller to manage identity objects. I have an editUser method
which displays forms to add and edit users:
@expose(template=".templates.form")
def editUser(self, tg_errors=None, *args, **params):
if tg_errors:
turbogears.flash("Error on form: " + str(tg_errors))
return dict(form=user_form, action='saveUser', title='Edit User')
the obvious next step will be to add logic to load a User object based on
the params and use that to populate the form. This must be fairly easy,
but it's sadly unclear to me. Any help?
- donald
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---