Skip to content

dmugtasimov/django_audit_trail

 
 

Repository files navigation

Audit Trail library

Syabro: Unfinished. Fix after implementing in the main project

Model history tracking

Usage

    class MyModel(models.Model):
        field1, field2, field3 = models.IntegerField(), models.IntegerField(), models.IntegerField()
        field4, field5         = models.TextField(), models.TextField()
        
        audit = AuditTrailWatcher(
            fields=['field1', 'field2'],
            track_creation=True,
            track_update=True,
            track_deletion=True,
            track_related=['somemodel_set', 'somefk']
        )

Options

fields — list of fields to track. If is not provided — track all fields.
track_creation — track model creation, default True
track_update — track model update, default True
track_deletion — track model deletion, default True
track_related - track related objects changes

Code Health Travis CI

About

Django Audit Trail library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.6%
  • HTML 2.4%