On Apr 5, 7:05 pm, pbreit <[email protected]> wrote:
> Is there some way to work with joined data like this?
>
> rows = ((db.item.status=='active') &
>             (db.item.created_by==db.auth_user.id)).select()
>
> return (rows=rows)
>
> {{for item, user in rows.item, rows.auth_user:}}
>     {{=item.id}} by {{=user.first_name}}
> {{pass}}
>
> I'm not sure if it's possible or how to do this part:
>
>      {{for item, user in rows.item, rows.user:}}


I believe you want:

{{for row in rows:}}
  {{=row.item.id}} by {{=row.auth_user.first_name}}
{{pass}}

Reply via email to