Hi!
I have a problem with web2py ... I want to timestamp user-initiated changes
in tables which perfectly works when using
Field('modified_on', 'datetime', default=request.now,
update=request.now, readable=False, writable=False),
But since my application also changes values in rows in that database, the
field "modified_on" does not contain the timestamp of the last change made
by a users.
My idea is not to use "update=request.now" in the model but to implement
some logic in the form processing that only updates the "modified_on" field
if a user changed that row.
In my controller I use
form = crud.update(...)
to create the form. I guess I have to add an onaccept function but don't
know how to implement exactly. I am also not sure if this would work
because the field is neither readable nor writable so generally not even
part of the form.
I appreciate every hints and solutions! :)
Greetings,
Jochen
--
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.