>
>
> I have tried this and work, let me know if it's the think you wanted. I
have used SQLFORM but i guess the code will be the same for CRUD (I have
never used it)
Just my workaround, I think there will be a better method perhaps
import time # This is required to include time module.
import datetime
db.define_table( 'sample',
Field('end_time','integer'),
Field('duration','integer'),
Field('mytimestamp','datetime', readable=False,
writable=False)
)
form = SQLFORM(db.sample)
if form.process().accepted:
response.flash = 'form accepted'
db(db.sample.id ==
form.vars.id).update(mytimestamp=datetime.datetime.now())
return dict(form=form)
--
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.