Changes between Version 13 and Version 14 of AuditTrail
- Timestamp:
- Aug 19, 2008, 1:43:56 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AuditTrail
v13 v14 15 15 16 16 class Person(models.Model): 17 first_name = models.CharField(max length=255)18 last_name = models.CharField(max length=255)17 first_name = models.CharField(max_length=255) 18 last_name = models.CharField(max_length=255) 19 19 salary = models.PositiveIntegerField() 20 20 … … 155 155 def contribute_to_class(self, cls, name): 156 156 # This should only get added once the class is otherwise complete 157 def _contribute(sender ):157 def _contribute(sender, **kwargs): 158 158 model = create_audit_model(sender, **self.opts) 159 159 descriptor = AuditTrailDescriptor(model._default_manager, sender._meta.pk.attname) 160 160 setattr(sender, name, descriptor) 161 161 162 def _audit_track(instance, field_arr ):162 def _audit_track(instance, field_arr, **kwargs): 163 163 field_name = field_arr[0] 164 164 try: … … 172 172 return field_arr[2] 173 173 174 def _audit(sender, instance, created ):174 def _audit(sender, instance, created, **kwargs): 175 175 # Write model changes to the audit model. 176 176 # instance is the current (non-audit) model. … … 193 193 194 194 if self.opts['audit_deletes']: 195 def _audit_delete(sender, instance ):195 def _audit_delete(sender, instance, **kwargs): 196 196 # Write model changes to the audit model 197 197 kwargs = {}