db.define_table('mytable',
SQLField('created_by',db.auth_user,writable=False),
SQLField('modified_by',db.auth_user,writable=False))
if auth.is_logged_in():
db.mytable.created_by.default=auth.user.id
db.mytable.modified_by.update=auth.user.id
On Mar 15, 2:55 pm, Marco Prosperi <[email protected]> wrote:
> hello ML,
> in the readme file of the web2py source distribution I've found
> examples to automatically timestamp when a record is created or
> modified, but how to stamp the user id that created or modified the
> record? Is there a simple way to do this as for the timestamp?
>
> thanks in advance for hints
>
> Marco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---