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

[web2py] Re: Dropdown list in form

2013-12-13 Thread Warrick
Thanks guys, Both worked! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

[web2py] Dropdown list in form

2013-12-12 Thread Warrick
method was by far easier, how could I implement this in the first example? Thanks Warrick -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received

[web2py] Hide First and Last name in Auth_User

2013-12-11 Thread Warrick
Prior to updating to 2.8.2 I could user the following code to hide the fields: db.auth_user.first_name.readable = db.auth_user.first_name.writable = False db.auth_user.last_name.readable = db.auth_user.last_name.writable = False However, now I receive an error: type 'exceptions.AttributeError'