Hi guys,
I'm using 2.6.4-stable+timestamp.2013.09.22.01.43.37 and I trying to log at
db every new record
created with SQLFORM.grid:
My controller:
def bodies():
grid = SQLFORM.grid(db.bodies, orderby=~db.bodies.id, oncreate=
log_action('System','Created new body'))
return dict(grid=grid)
my function log_action:
def log_action(origin, description):
db.auth_event.insert(time_stamp=request.now,
client_ip=request.env.remote_addr,
user_id=auth.user.id,
origin=origin,
description=description)
It's worked, but not as expected, I get four logs(four new records at
auth_event) when I add a only new record..
where is the problem?
Thanks
--
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.