django-track-history

Easy model change tracking for Django


Keywords
django, track, history
License
BSD-3-Clause
Install
pip install django-track-history==0.2.2

Documentation

Django Track History

A simple model change tracking for Django.

PostgreSQL exclusive as it uses some special database functions for better performance.

Installation

pip install django-track-history

Then add track_history to INSTALLED_APPS.

And add track_history.middleware.TrackHistoryMiddleware to the MIDDLEWARE list.

Decorate each model you want to track changes with @track_changes

@track_changes
class Author(models.Model):
    ...

Limitations

Django Track History does not track changes for bulk operations like bulk_create or .objects.filter(...).update(...). It is related to how Django handles that kind of queries.

Feature plans:

  • Better deferred model tests and tests for more complicated model structures
  • Django 2.0 support
  • Admin interface
  • EPIC: Handle bulk operations bulk_create, .objects.filter(...).update(...) (If it's even possible)

Legal

Copyright (c) 2023, Arkadiusz Szydełko All rights reserved.

Licensed under BSD 3-Clause License