Commit graph

109 commits

Author SHA1 Message Date
Jan-Jelle Kester
22997ded2f Fix import error
Issue #104
2017-02-16 22:24:24 +01:00
Stavros Korokithakis
03def6cdb3
Don't crash if the linked object is not in the admin (fixes #99) 2017-02-16 05:06:12 +02:00
Stavros Korokithakis
c127415a25
Allow register() to be called as a decorator (closes #88) 2017-02-11 05:02:22 +02:00
Jan-Jelle Kester
9bbb77bcda Merge branch 'master' into patch-1 2017-02-09 20:14:26 +01:00
Jan-Jelle Kester
d870f290f7 Merge branch 'master' into resource_url 2017-02-09 20:10:39 +01:00
Jan-Jelle Kester
e967d44bbc Merge branch 'master' into patch-1 2017-02-09 20:10:15 +01:00
Jan-Jelle Kester
2595d6ea64 Merge branch 'master' into use_tz_disabled 2017-02-09 20:06:00 +01:00
Stephen Goodman
62a0d82042 Fixed autologflush for django 1.10 2017-01-26 13:19:23 -06:00
Fernando Espíndola
e6ef7c5319 Use make_naive only if settings.USE_TZ is True. 2017-01-26 01:52:04 -02:00
Fernando Espíndola
38ec7de585 Fix the resource_url method when a model primary key is a models.UUIDField, we need to consider use the object_pk in this case. 2017-01-26 01:21:13 -02:00
Onur YALAZI
eef4a14cd3 Changed to actor's string represantation
Depending on actor's attributes is error prone, developers can extend the user model without the needed attributes.
2017-01-22 11:32:44 +02:00
Jan-Jelle Kester
210143e34c Merge branch 'master' into ticket-82-datetimefields 2017-01-21 20:15:46 +01:00
Onur YALAZI
56a9ab6ab8 LogEntryAdminMixin throws Attribute error If a user misses full_name 2017-01-18 13:40:22 +02:00
Kevin Alberts
80bd115012 Move the value retrieval process to a separate function to make the diff code more DRY. 2017-01-18 09:36:16 +01:00
Kevin Alberts
6f4c6eb8a2 Make it so Django's timezone-aware DateTimeFields remain unchanged when Django resets the timezone. DateFields are not timezone-aware, so they do not need fixing.
Django converts the timezone of DateTimeFields to UTC when the field gets saved. This makes it so when you update a model which includes a DateTimeField, and your server is running in another timezone, the AuditLog will think you changed the timestamp, while it actually is the same time, but in another timezone. This commit adds a specific check in the model_instance_diff function for DateTimeField models (and any subclasses of it), which converts the old and new values to UTC before comparing them to see if they've actually changed. It also adds tests to see if the code works properly.

The extra test_setting (USE_TZ) is added because timezone support is disabled if it is not specified, this setting enables it.
2017-01-11 20:07:10 +01:00
Kevin Alberts
1c28dbb0d6 Updated LogEntryAdmin to use first_name and last_name fields instead of full_name from the actor 2017-01-11 00:12:54 +01:00
Kevin Alberts
f498f740ee Updated LogEntryAdminMixin to use get_full_name() method from Django Auth.User model 2017-01-10 16:55:06 +01:00
isszul
25ca523301 implemented suggested fix in #72 2016-11-02 13:30:05 +00:00
Rob Guttman
20eb91359a enhanced admin interface closes #1 2016-09-02 15:02:42 -04:00
Jan-Jelle Kester
7824fb27f1 Update middleware for Django 1.10 2016-08-17 22:45:02 +02:00
Nitesh Rijal
3aeab92b35 added admin filter by content_types 2016-08-16 18:58:06 +05:45
Nitesh Rijal
022ba4c730 added a simple admin interface for audit log entries 2016-08-16 08:23:36 +05:45
Jan-Jelle Kester
2d9fab421e Merge branch 'master' into flush-command 2016-08-02 17:32:31 +02:00
Jan-Jelle Kester
889cb16c64 Merge branch 'master' into migration-magic 2016-08-02 17:26:48 +02:00
Jan-Jelle Kester
81bcd47ab0 Add management command for deleting all log entries
Issue #57
2016-07-27 18:17:59 +02:00
Jan-Jelle Kester
eb0574d115 Change existing migration to fix issues for MySQL users
Issue #54
2016-07-27 17:32:19 +02:00
Jan-Jelle Kester
65ae0e6705 Upgrade django-jsonfield dependency 2016-07-27 17:27:48 +02:00
Jan-Jelle Kester
091dccf6a7 Proposed fix for issue #45 2016-01-23 22:38:02 +01:00
Jan-Jelle Kester
82aca6b352 Make Django 1.9+ accept the settings file 2016-01-23 21:41:19 +01:00
Jan-Jelle Kester
7524801bb7 Remove unwanted blank line 2016-01-23 21:13:43 +01:00
Justin Littman
16a8b158e0 Change get_for_objects to distinguish between number and text keys. 2016-01-05 11:59:43 -05:00
Keith Bussell
eeb65f746d Fix unregister call and add tests. Fixes #42 2015-11-11 14:07:31 -08:00
Scott Adams
26237a9863 Code nazi told me to put db_index=True at the front of the queue 2015-10-19 04:24:12 +02:00
Scott Adams
c4ed32b89b Add db_index=True to object_pk 2015-10-18 03:17:41 +02:00
Scott Adams
96e62781b8 Create 0006_object_pk_index.py
Seq Scan on auditlog_logentry on heroku postgres. I suspect because of missing index.

````
SELECT "auditlog_logentry"."id", "auditlog_logentry"."content_type_id", "auditlog_logentry"."object_pk", "auditlog_logentry"."object_id", "auditlog_logentry"."object_repr", "auditlog_logentry"."action", "auditlog_logentry"."changes", "auditlog_logentry"."actor_id", "auditlog_logentry"."remote_addr", "auditlog_logentry"."timestamp", "auditlog_logentry"."additional_data" FROM "auditlog_logentry" WHERE ("auditlog_logentry"."content_type_id" = %s AND "auditlog_logentry"."object_pk" = %s) 
```
2015-10-18 01:51:40 +02:00
Scott Adams
6b8f7b94a5 Create 0005_logentry_additional_data_verbose_name.py
Verbose name was missing from 004 so makemigrations causes this.
2015-10-18 01:47:45 +02:00
Jan-Jelle Kester
4bb432b489 Add app configs 2015-10-07 22:24:41 +02:00
jay7958
655e02e806 Changed import to use the new apps module for get_model, this removes
the Django warning:
site-packages/auditlog/middleware.py:9: RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system.
  from django.db.models.loading import get_model
2015-08-20 13:49:22 -05:00
jay7958
59fc9eff18 Changed import statement and reference to GenericRelation in order
to remove the following Django Warning:
site-packages/auditlog/models.py:6: RemovedInDjango19Warning:
  django.contrib.contenttypes.generic is deprecated and will be
  removed in Django 1.9. Its contents have been moved to the
  fields, forms, and admin submodules of
  django.contrib.contenttypes.
    from django.contrib.contenttypes import generic
2015-08-20 12:53:59 -05:00
Scott Adams
4dc11ab6fb Fixes #31 2015-07-29 13:27:15 +02:00
Jan-Jelle Kester
dab0342cf6 Merge branch 'master' into release-0.3.0
Conflicts:
	src/auditlog/diff.py
2015-07-22 01:06:32 +02:00
Jan-Jelle Kester
ed055d93bc Merge pull request #28 from jjkester/improved-diffs
Improve diffs
2015-07-22 00:35:09 +02:00
Jan-Jelle Kester
ccaf3925e4 Provide fallback for when a field has no 'rel' attribute 2015-07-22 00:32:27 +02:00
Jan-Jelle Kester
99d87bee52 Fix overlapping migrations 2015-07-22 00:24:46 +02:00
Jan-Jelle Kester
7d6380206f Extract field tracking test, do not track any relation to LogEntry 2015-07-22 00:16:33 +02:00
Jan-Jelle Kester
a689823b26 Exclude AuditlogHistoryField from diffs 2015-07-22 00:03:54 +02:00
Jan-Jelle Kester
ef4b93a551 Merge pull request #29 from jjkester/threadlocals
Use threadlocals and log remote address
2015-07-21 23:50:40 +02:00
Jan-Jelle Kester
952536f255 Additional field for metadata 2015-07-21 23:46:31 +02:00
Ann Paul
bade679b81 Fix typo on test class name changing it to AdditionalDataIncludedModel 2015-06-03 08:49:03 -07:00
Ann Paul
23927ea317 Add verbose name to the additional_data field
Directly call the get_additional_data method without instance
2015-06-03 08:47:50 -07:00