In the "people" controller(people.py), i defined a field named
"group", which is used to display the options of "groups".
My idea is this field would display all "name" field of group with the
value of "id". It picks up "id" value when i'm attempting to create a
new "people" model in its creation form.
But it failed, anybody can give me guidelines how to implement this ?
def getGroups():
groups=[]
for group in session.query(Group):
groups.append([group.id,group.name])
group = widgets.SingleSelectField(name="group_id", options=getGroups,
label="Group")
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---