Re: generate choices list from database

2007-07-08 Thread Russell Keith-Magee
On 7/8/07, Stu <[EMAIL PROTECTED]> wrote: > > In a similar vein to the OP, I'm trying to populate a choices list for > a form (using newforms) from a database: > > nameChoices = Names.objects.filter(initials='AB') > NameSelection.base_fields['names'].widget = >

generate choices list from database

2007-07-08 Thread Stu
In a similar vein to the OP, I'm trying to populate a choices list for a form (using newforms) from a database: nameChoices = Names.objects.filter(initials='AB') NameSelection.base_fields['names'].widget = widgets.Select(choices=nameChoices.Name) However, I am not having much succcess, I get