[web2py] call username in query

2013-12-20 Thread Warrick
Hi All, I am writing a SQLFORM.grid, but I want user to be able to only read, delete and edit their own records. I am wanting to write a query, but how do I reference the logged in user's username from .db.auth_user? query: query=((db.battle_log.created_by = “logged in user”)) Thanks --

Re: [web2py] call username in query

2013-12-20 Thread Federico Ferraro
query=((db.battle_log.created_by == auth.user_id)) 2013/12/20 Warrick warrick.m...@gmail.com Hi All, I am writing a SQLFORM.grid, but I want user to be able to only read, delete and edit their own records. I am wanting to write a query, but how do I reference the logged in user's