Well the img did not appeared, when I say referenced tables, I mean the links: Auth cases Auth events s Auth memberships<http://127.0.0.1:8000/vermais/gerencial/clientes/auth_user/contratado.userid/2?_signature=78507f64e87aa870b7db421e202791b838801ec7>
Em segunda-feira, 17 de junho de 2013 20h36min24s UTC-3, André Kablu escreveu: > > Hi all, > > I am trying to create a grid with a query for auth_user table doing this: > > def controller1(): > > query = ((db.auth_user.id == db.auth_membership.user_id) & > (db.auth_membership.group_id == 1)) > grid = SQLFORM.smartgrid(db.auth_user, > constraints=dict(auth_user=query > ), > deletable=False, > editable=True, > create=False, > csv=False) > return dict(grid=grid) > > I am doing a constraint to filter only for members of group 1 in list... > and it is working fine. > > However when I try to click to any referenced table: > > > It shows this error: > > <type 'exceptions.AttributeError'> 'Row' object has no attribute > 'first_name' > I already tried to separate queries in constraints like this: > > query1 = db.auth_membership.user_id == db.auth_user.id > query2 = db.auth_membership.group_id == 1 > grid = SQLFORM.smartgrid(db.auth_user, > constraints=dict(auth_user=query1, > auth_membership=query2 > ), > deletable=False, > editable=True, > create=False, > csv=False) > > However it still return same error when clicking in one of the referenced > tables. > > > > Do anyone have an idea of what am I doing wrong? > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

