Changes between Version 3 and Version 4 of AuditTrail
- Timestamp:
- Aug 27, 2007, 8:58:31 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AuditTrail
v3 v4 56 56 As you can see, the audit trail is listed with the most recent state first. Each entry also inclues a timestamp when the edit took place. 57 57 58 Saves and deletes are both tracked, and can be filtered on via {{{ Person.history.filter(_audit_change_type='_') }}}. Do not use underscore, use 'U' for inserts/updates, and 'D' for deletes. If #4879 lands, then we will be able to distinguish between inserts and updates, and at that point the audit trail will use 'I' for inserts and 'U' for updates. 59 58 60 == Caveats == 59 60 For one thing, only `post_save` is used right now, so if you have need for `post_delete`, you'll need to put that in whatever way you'd like.61 61 62 62 Also, in order to copy the fields from the original model to the audit model, it uses some hackery I'm not particularly proud of. It seems to work for all the cases I would have hoped it would, but it relies on the arguments passed to the Field class being named the same as the attributes stored on the Field object after it's created. If there's ever a time that's not the case, it will fail completely on that Field type.