A Django app allowing the tracking of objects field in the admin site.
Project description
Tracking Fields
A Django app allowing the tracking of objects field in the admin site.
Requirements
Django 2.2: See older versions for earlier version of Django.
django-cuser: Only if you want to track which user made the modifications.
Quick start
Add “tracking_fields” to your INSTALLED_APPS settings.
Add the tracking_fields.decorators.track decorator to your models with the fields you want to track as parameters:
@track('test', 'm2m') class MyModel(models.Model): test = models.BooleanField('Test', default=True) m2m = models.ManyToManyField(SubModelTest, null=True)
Your objects are now tracked. See the admin site for the tracking information.
If you want to track who does the changes, please install the django-cuser app.
You can also track fields of related objects:
class MyModel(models.Model): test = models.BooleanField('Test', default=True) @track('related__test') class MyOtherModel(models.Model): related = models.ForeignKey(MyModel)
You can run the tests with tox (make sure to have django-cuser installed).
Upgrades from 0.1 or 1.0.1
The change to UUID is a mess to do in a migration. The migrations have thus been squashed. You can either alter your fields by hand and do a fake migration afterward or remove your tracking fields tables and run migrations again:
./manage.py migrate --fake tracking_fields zero ./manage.py migrate tracking_fields
FAQ
Why does my relationship change create two events ?
Please see https://docs.djangoproject.com/en/1.7/ref/models/relations/#direct-assignment
LICENSE
GPLv3+
Changelog
1.3.1 (2021-02-19)
Added get_object_model_verbose_name.
1.3.0 (2021-02-19)
Added get_object_model on TrackingEvent to be able to get model class in templates.
Fix deprecation warnings for Django 4.0.
Drop support for Django 2.0 and 2.1.
1.2.1 (2020-10-20)
Deferred fields are not tracked to avoid additional requests.
1.2.0 (2020-05-07)
fix ‘str’ object has no attribute ‘name’ #6
Django 3.0 compatibility
Drop support for Django 1.11
1.1.2 (2019-09-11)
added serialization for xworkflow StateWrapper
1.1.1 (2019-01-25)
Optimize admin user lookup
1.1.0 (2019-01-24)
Compatibility with Django 1.11 to 2.1
Compatibility droped for earlier versions
1.0.6
Fix unicode error in admin with Python 3.4 and django_cuser
1.0.5
Fix MANIFEST
1.0.4
Order TrackingEvent by -date
1.0.3
Fix MANIFEST
1.0.2
Include migrations in MANIFEST
1.0.0
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-tracking-fields-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06fdb986ba3f3c8a7b57568d417589b1b0eab5247bc6e97e6e30abecd6cf4e98 |
|
MD5 | 41115b35f9767f8359fe9698d8a96bd6 |
|
BLAKE2b-256 | 309567ce9ebb04c7b8143e067c7d204ebed7cf42287ede29d25f473a6ce376bf |
Hashes for django_tracking_fields-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ac2466eb7c08e65fec0e81b2f11a809fecf5b4b8e65f6ab2e2e4fcdfc23ed8f |
|
MD5 | 9bfefbc22e0461090117087cc4b5ea6f |
|
BLAKE2b-256 | ee194c1064b523539b4edc282826174eb01a6343bee8ebb40d65bc99c87ceca9 |