[web2py] Re: Set username as default

2012-02-07 Thread Omi Chiba
Thank you both !! It works perfectly. On Feb 7, 1:36 pm, Massimo Di Pierro wrote: > db.IQWAGFTY.TYUUSR.default=dba.auth_user(auth.user_id).username.upper() > > On Feb 7, 1:31 pm, Omi Chiba wrote: > > > > > > > > > I want to set username (Not id) to table when the record is created > > using "imp

[web2py] Re: Set username as default

2012-02-07 Thread Massimo Di Pierro
db.IQWAGFTY.TYUUSR.default=dba.auth_user(auth.user_id).username.upper() On Feb 7, 1:31 pm, Omi Chiba wrote: > I want to set username (Not id) to table when the record is created > using "import_from_csv_file". > The following model cause error because when you open the website > auth.user_id

[web2py] Re: Set username as default

2012-02-07 Thread Ross Peoples
I usually do this: default = auth.user.username.upper() if auth.user else None