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
>
> 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),
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
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',
4 matches
Mail list logo