Why not just use before_update?
On Friday, November 9, 2012 10:53:21 AM UTC-7, Jim S wrote:
I'm missing something. I have a table where I want to react to changes to
a particular field. I'm trying to use the _after_update callback check for
this. However, using this it appears to me that
Because the update may fail.
-Jim
On Friday, November 9, 2012 12:20:18 PM UTC-6, Derek wrote:
Why not just use before_update?
On Friday, November 9, 2012 10:53:21 AM UTC-7, Jim S wrote:
I'm missing something. I have a table where I want to react to changes
to a particular field. I'm
Use before_update to store the current data in the session, then the
after_update would have access to it.
On Friday, November 9, 2012 11:55:36 AM UTC-7, Jim S wrote:
Because the update may fail.
-Jim
On Friday, November 9, 2012 12:20:18 PM UTC-6, Derek wrote:
Why not just use
I thought of that too, but for some reason it appears to be a fragile
solution in my mind. Should I be putting more faith in the stack? Is this
something that is commonly done?
-Jim
On Fri, Nov 9, 2012 at 1:39 PM, Derek sp1d...@gmail.com wrote:
Use before_update to store the current data in
simple scientific thoughts.
It's like databases triggers. Db triggers apply to the onupdate event,
i.e. they let you use a set of just updated fields AND the fields that are
going to be updated.
Web2py has to intercept the update before or after, because databases (the
python dbapi in general)
Thanks Niphlid, I was going to ask about the db.commit issue before but
forgot. I'm going to give the _before_update callback a try and see how
well that works for me.
Thanks for all the responses, I truly appreciate it.
-Jim
On Fri, Nov 9, 2012 at 3:32 PM, Niphlod niph...@gmail.com wrote:
Just reporting back. The _before_update is working perfectly for me.
-Jim
On Fri, Nov 9, 2012 at 3:45 PM, Jim Steil ato.st...@gmail.com wrote:
Thanks Niphlid, I was going to ask about the db.commit issue before but
forgot. I'm going to give the _before_update callback a try and see how
Cool, I might have suggested using versioning if all you are trying to do
is to track changes.
On Friday, November 9, 2012 3:38:28 PM UTC-7, Jim S wrote:
Just reporting back. The _before_update is working perfectly for me.
-Jim
On Fri, Nov 9, 2012 at 3:45 PM, Jim Steil ato@gmail.com
8 matches
Mail list logo