- feat: Excluding ip address when
AUDITLOG_DISABLE_REMOTE_ADDR
is set to True (#620) - feat: If any receiver returns False, no logging will be made. This can be useful if logging should be conditionally enabled / disabled (#590)
- Django: Confirm Django 5.0 support (#598)
- Django: Drop Django 4.1 support (#598)
- Python: Confirm Python 3.12 support (#572)
- feat:
thread.local
replaced withContextVar
to improve context managers in Django 4.2+
- fix: Handle
ObjectDoesNotExist
in evaluation ofobject_repr
(#592)
- feat: stop deleting old log entries when a model with the same pk is created (i.e. the pk value is reused) (#559)
- fix: only fire the
post_log
signal when the log is created or when there is an error in the process (#561) - fix: don't set the correlation_id if the
AUDITLOG_CID_GETTER
isNone
(#565)
- feat: Change
LogEntry.change
field type toJSONField
rather thanTextField
. This change include a migration that may take time to run depending on the number of records on yourLogEntry
table (#407)(#495) - Python: Drop support for Python 3.7 (#546)
- feat: Set
AuditlogHistoryField.delete_related
toFalse
by default. This is different from the default configuration of Django'sGenericRelation
, but we should not erase the audit log of objects on deletion by default. (#557)
- Changes the view when it has changes in fields
JSONField
. TheJSONField.encoder
is assigned tojson.dumps
. (#489) - feat: Added support for Correlation ID. (#481)
- feat: Added pre-log and post-log signals. (#483)
- feat: Make timestamp in LogEntry overwritable. (#476)
- feat: Support excluding field names globally when
AUDITLOG_INCLUDE_ALL_MODELS
is enabled. (#498) - feat: Improved auto model registration to include auto-created models and exclude non-managed models, and automatically register m2m fields for models. (#550)
- fix: Audit changes to FK fields when saved using
*_id
naming. (#525) - fix: Fix a bug in audit log admin page when
USE_TZ=False
. (#511) - fix: Make sure
LogEntry.changes_dict()
returns an empty dict instead ofNone
whenjson.loads()
returnsNone
. (#472) - fix: Always set remote_addr even if the request has no authenticated user. (#484)
- fix: Fix a bug in getting field's
verbose_name
when model is not accessible. (508) - fix: Fix a bug in
serialized_data
with F expressions. (508) - fix: Make log entries read-only in the admin. (#449, #556) (applied again after being reverted in 2.2.2)
- fix: revert #449 "Make log entries read-only in the admin" as it breaks deletion of any auditlogged model through the admin when
AuditlogHistoryField
is used. (#496)
- fix: Make log entries read-only in the admin. (#449)
- fix: Handle IPv6 addresses in
X-Forwarded-For
. (#457)
- feat: Add
ACCESS
action toLogEntry
model and allow object access to be logged. (#436) - feat: Add
serialized_data
field onLogEntry
model. (#412) - feat: Display the field name as it would be displayed in Django Admin or use
mapping_field
if available #428 - feat: New context manager
disable_auditlog
to turn off logging and a new settingAUDITLOG_DISABLE_ON_RAW_SAVE
to disable it during raw-save operations like loaddata. #446 - Python: Confirm Python 3.11 support (#447)
- feat: Replace the
django.utils.timezone.utc
bydatetime.timezone.utc
. #448
- fix: Foreign key values are used to check for changes in related fields instead of object representations. When changes are detected, the foreign key value is persisted in
LogEntry.changes
field instead of object representations. (#420) - fix: Display
created
timestamp in server timezone (#404) - fix: Handle port in
remote_addr
(#417) - fix: Handle the error with AttributeError: 'OneToOneRel' error occur during a
PolymorphicModel
has relation with other models (#429) - fix: Support search by custom USERNAME_FIELD (#432)
- feat: Display the diff for deleted objects in the admin (#396)
- Django: Confirm Django 4.1 support (#406)
- fix: Pin
python-dateutil
to 2.7.0 or higher for compatibility with Python 3.10 (#401)
- feat: Add
--before-date
option toauditlogflush
to support retention windows (#365) - feat: Add db_index to the
LogEntry.timestamp
column (#364) - feat: Add register model from settings (#368)
- Context manager set_actor() for use in Celery tasks (#262)
- Tracking of changes in many-to-many fields (#309)
- Fix inconsistent changes with JSONField (#355)
- Disable
add
button in admin ui (#378) - Fix n+1 query problem(#381)
- feat: enable use of replica database (delegating the choice to
DATABASES_ROUTER
) (#359) - Add
mask_fields
argument inregister
to mask sensitive information when logging (#310) - Django: Drop 2.2 support.
django_jsonfield_backport
is not required anymore (#370) - Remove
default_app_config
configuration (#372)
- LogEntry no longer save to same database instance is using
- build: add classifiers for Python and Django
- build: replace django-jsonfield with django-jsonfield-backport (#339)
- ci: replace Travis with Github Actions
- docs: follow Jazzband guidelines (badge, how to contribute, code of conduct) (#269)
- docs: add a changelog
- docs: remove note about maintenance
- docs: update the release strategy
- docs: use the latest django LTS (3.2) to build docs
- feat: add a db index to
LogEntry
'saction
field (#236) - feat: add the content type to
resource
field - feat: add the
actor
username to search fields in admin - refactor: lint the code with Black and isort
- tests: init pre-commit config
- Python: add 3.9 and 3.10 support, drop 3.5 and 3.6 support
- Django: add 3.2 (LTS) and 4.0 support, drop 3.0 and 3.1 support
- docs: replace
MIDDLEWARE_CLASSES
withMIDDLEWARE
- Remove old django (< 1.9) related codes
- Replace deprecated
smart_text()
withsmart_str()
- Replace
ugettext
withgettext
for Django 4 - Support Django's save method
update_fields
kwarg (#336) - Fix invalid escape sequence on Python 3.7
- Refactor the
auditlogflush
management command - Clean up project structure
- Python: add 3.8 support, drop 2.7 and 3.4 support
- Django: add 3.0 and 3.1 support, drop 1.11, 2.0 and 2.1 support
- Fix field choices diff
- Allow higher versions of python-dateutil than 2.6.0
- Add support for PostgreSQL 10
- Improve support multiple database (PostgreSQL, MySQL)
- Django: add 2.1 and 2.2 support, drop < 1.11 versions
- Python: add 3.7 support
- Allow
AuditlogHistoryField
to block cascading deletes (#172)
- Add Python classifiers for supported Python versions (#176)
- Update README to include steps to release (#185)
- Fix the rendering of the
msg
field with Django 2.0 (#166) - Mark
LogEntryAdminMixin
methods output as safe where required (#167)
Added support for Django 2.0, along with a number of bug fixes.
- Use Tox to run tests
- Use Codecov to check to coverage before merging
- Django: drop 1.9 support, add 1.11 (LTS) support
- Python: tests against 2.7, 3.4, 3.5 and 3.6 versions
- Add
python-dateutil
to requirements
- Support models with UUID primary keys (#111)
- Add management commands package to setup.py (#130)
- Add
changes_display_dict
property toLogEntry
model to display diff in a more human readable format (#94)
- Fixes cricital bug in admin mixin making the library only usable on Django 1.11
As it turns out, haste is never good. Due to the focus on quickly releasing this version a nasty bug was not spotted, which makes this version only usable with Django 1.11 and above. Upgrading to 0.4.3 is not only encouraged but most likely necessary. Apologies for the inconvenience and lacking quality control.
- Models can be registered with decorators now
- A lot, yes, really a lot, of fixes for the admin integration
- Flush command fixed for Django 1.10
- Improved Django Admin pages
- Fixed multithreading issue where the wrong user was written to the log
- Dropped support for Django 1.7
- Updated dependencies - please check whether your project works with these higher versions
- Management command for deleting all log entries
- Added admin interface (thanks, @crackjack)
- Django: add 1.10 support
- Solved migration error for MySQL users
- fix
unregister
method LogEntry.objects.get_for_objects
works properly on PostgreSQL- Added index in 0.3.2 no longer breaks for users with MySQL databases
- The
object_pk
field is now limited to 255 chars
- Django: support 1.9
- Enhanced performance for non-integer primary key lookups
- Auditlog data is now correctly stored in the thread.
- Django: drop out-of-date versions support, support 1.7+
- South is no longer supported
- Workaround for many-to-many support
- Additional data
- Python: support 2.7 and 3.4
- Better diffs
- Remote address is logged through middleware
- Better documentation
- Compatibility with django-polymorphic
- South compatibility for
AuditlogHistoryField
Although this release contains mostly bugfixes, the improvements were significant enough to justify a higher version number.
- Signal disconnection fixed
- Model diffs use unicode strings instead of regular strings
- Tests on middleware
- Utility methods for using log entry data
- Only save a new log entry if there are actual changes
- Better way of loading the user model in the middleware
First beta release of Auditlog.