{"repo":"AmbitionEng/django-pghistory","free":true,"listed":false,"github":"https://github.com/AmbitionEng/django-pghistory","clone":"git clone https://github.com/AmbitionEng/django-pghistory.git","description":"Track historical events to Django models using Postgres triggers.","language":"Python","stars":540,"topics":["django","history","postresql"],"license":"BSD-3-Clause","category":"api-integrations-sdks","readme_excerpt":"django-pghistory django-pghistory tracks changes to your Django models using Postgres triggers, providing: Reliable history tracking everywhere with no changes to your application code. Structured history models that mirror the fields of your models. Grouping of history with additional context attached, such as the logged-in user. django-pghistory has a number of ways in which you can configure history tracking for your application's needs and for performance and scale. An admin integration and middleware is included out of the box too. Quick Start Decorate your model with pghistory.track . For example: Above we've tracked TrackedModel . Copies of the model will be stored in a dynamically-created event model on every insert and update. Run python manage.py makemigrations followed by migrate and voila , every change to TrackedModel is now stored. This includes bulk methods and even changes that happen in raw SQL. For example: Above we printed the history of int field . We also printed pgh obj , which references the tracked object. We'll cover how these fields and additional metadata fields are tracked later. django-pghistory can track a subset of fields and conditionally store events based on specific field transitions. Users can also store free-form context from the application in event metadata, all with no additional database queries. See the next steps below on how to dive deeper and configure it for your use case. Compatibility django-pghistory is compatible with Python 3","default_branch":null,"files":null,"tree":[],"storefront":"/r/AmbitionEng","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AmbitionEng/django-pghistory/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}