Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Vinicius Assef
Thanks, Anthony. On Mon, Nov 21, 2011 at 1:09 PM, Anthony wrote: >> But, according to your define_table()'s, these tables can only be >> managed (insert or update) with a logged user, or default contents >> will raise an excpetion because there's no logged user. > > The defaults won't raise an ex

Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Anthony
> > But, according to your define_table()'s, these tables can only be > managed (insert or update) with a logged user, or default contents > will raise an excpetion because there's no logged user. > The defaults won't raise an exception (as long as auth is defined prior to the table definitions),

Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Vinicius Assef
On Mon, Nov 21, 2011 at 12:41 PM, thodoris wrote: > Two questions: > > and i want the videos.table field to take values only from the entries > that the same user has entered or Null > > NoneType' object has no attribute 'id' , because the user initially is > not logged in so there is no auth.user

[web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread thodoris
Two questions: I have the following scheme: db.define_table('table', Field('title'), Field('author_id', default=auth.user_id,readable=False, writable=False), ... ) db.define_table('videos', Field('author_id',default=auth.user_id,readable=False, writable=False), Field('table',