Hi,
I have this code
auth.settings.extra_fields['auth_user']= [
Field('nickname', 'string', length=20, required=True, writable=False),
Field('image', 'upload'),
Field('thumb', 'upload', writable=True, readable=False, compute = lambda row
: SMARTHUMB(row.image, (50,50) )),
Field('point', 'integer', default=0, writable=False, compute = lambda
row:COMPUTE_POINT_USER
(row.id, db)),
Field('point_total', 'integer', default=0, writable=False),
Field('last_review', 'datetime', writable=False),
]
in my controller:
db(db.auth_user.id==auth.user_id).update(last_review=datetime.now())
db.commit()
I expect the recompute on point field of the user.
Is correct?
Unfortunately, after commit the record of user is updated only on
"last_review" field.
Can anyone help me?
I'd like to use compute fields and no virtual fields.
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/d/optout.