Changes between Version 11 and Version 12 of AuditTrail
- Timestamp:
- Aug 2, 2008, 8:09:03 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AuditTrail
v11 v12 1 1 = Automating an audit trail = 2 2 3 As raised in [http://groups.google.com/group/django-developers/browse_thread/thread/ab7649e4abd4e589 a recent discussion on django-developers], this code is one solution for creating an audit trail for a given model. '''This is working in multiple production sites, but is still incomplete. See [#Caveats Caveats] below for more information.''' The code below requires an SVN checkout as of r 6269or later.3 As raised in [http://groups.google.com/group/django-developers/browse_thread/thread/ab7649e4abd4e589 a recent discussion on django-developers], this code is one solution for creating an audit trail for a given model. '''This is working in multiple production sites, but is still incomplete. See [#Caveats Caveats] below for more information.''' The code below requires an SVN checkout as of r7790 or later. 4 4 5 5 == Usage == … … 277 277 # If 'unique' is in there, we need to remove it, otherwise the index 278 278 # is created and multiple audit entries for one item fail. 279 attrs[field.name]. unique = False279 attrs[field.name]._unique = False 280 280 281 281 for track_field in _track_fields(kwargs['track_fields']):