Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
FieldHistoryMiddleware
✓ from field_history.middleware import FieldHistoryMiddleware
✗ from django_field_history.middleware import FieldHistoryMiddleware
Enable field tracking by adding the app and middleware, then attach HistoricalRecords to your model with the fields you want to track.
# settings.py
INSTALLED_APPS = [
'django.contrib.contenttypes',
'django.contrib.admin',
'django_field_history',
# ...
]
MIDDLEWARE = [
'django_field_history.middleware.FieldHistoryMiddleware',
# ...
]
# models.py
from django.db import models
from django_field_history.models import HistoricalRecords
class MyModel(models.Model):
name = models.CharField(max_length=100)
history = HistoricalRecords(fields=['name'])
# Run migrations and use admin to see history.
Upgrade
Version history
0.8.0latest on PyPI · released Jan 5, 2020
Audit
Dependencies
DjangorequiredCore framework dependency