Hi,

I need to get all the phone numbers of users who meet a certain
condition, then I build a datagrid with them

                users =
DBSession.query(Personal).filter(cond)
                for user in users:
                    phones = DBSession.query(Phones).filter(cond2))
                    phones = phones.append(phones)
.
.
.
            rows = [ {'id'  :phone.mac,
                      'cell': [phone.mac, phone.name, phone.address,
phone....],
                      'class':'yellow'
                      } for phone in phones
                    ]

this solution does not work

regards



On 18 nov, 14:17, Christoph Zwerschke <[email protected]> wrote:
> Am 18.11.2011 10:42, schrieb Diez B. Roggisch:
>
> >> phones = DBSession.query(Phone).filter('...').one()
>
> > Here you are getting a single object
>
> Sorry, remove the .one().
>
> I think the OP needs to clarify what he really wants.
>
> -- Christoph

-- 
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.

Reply via email to