>
> tested using before_delete callback is not work, because the main problem 
> of webp2y imho is when using record_versioning or auth.signature, the 
> record is not actually deleted, just set the field is_active into False / 
> off, so the before_delete callback is not execute, the solution just use 
> the form level ondelete.
>

In that case, just change your after_update callback -- have it check 
whether the updated fields include is_active=False, and if so, record it as 
a deletion instead of an update.

Note, if you don't like the is_active approach, you can just make sure your 
tables are defined without an "is_active" field (you'll have to make up 
your own "signature" instead of using the default auth.signature). In that 
case, updated records will still be versioned in the archive, but deletes 
will result in the record actually being deleted instead of marked as 
inactive.

Anthony

-- 
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.

Reply via email to