Alieh Rymašeŭski
2ac014baa5
Remove a redundant exception handler
...
It duplicates the handler for its parent class Exception.
2022-06-28 19:20:02 +02:00
Alieh Rymašeŭski
68c7f44f9c
Make checks for empty collections more pythonic
2022-06-28 19:20:02 +02:00
Alieh Rymašeŭski
121fe99cf5
Simplify is_authenticated check
...
This attribute is defined on request.user from Django 1.10 or a
comparably ancient version.
2022-06-28 19:20:02 +02:00
Hasan Ramezani
7771075dc0
Remove South compatibility codes
2022-06-28 19:19:09 +02:00
Viktor
d928ff7f77
Return default value None if attribute choices doesn't exist
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-06-27 09:08:19 +02:00
Hasan Ramezani
11dceb81b8
Add flake8 to pre-commit config ( #387 )
2022-06-18 20:50:25 +04:30
Alieh Rymašeŭski
10c47181bb
Add logic to track changes to m2m fields ( #309 )
2022-06-08 17:09:27 +02:00
Hasan Ramezani
2e9466d1b4
Change auditlogflush management command before_date query filter to apply the filter only on date part of timestamp ( #384 )
2022-06-08 16:47:13 +02:00
George Leslie-Waksman
128555fa29
Add date based auditlog filter for auditlogflush command ( #365 )
2022-05-31 21:35:50 +04:30
Youngkwang Yang
dd89c3cefb
Auditlog admin use list_select_related ( #382 )
...
* Use list_select_related
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-31 15:50:34 +00:00
Youngkwang Yang
957680e239
Fix n+1 query problem ( #381 )
2022-05-31 20:05:43 +09:00
George Leslie-Waksman
1e7d320a93
Add an index to the timestamp column ( #364 )
...
Many queries, including the default ordering, for the LogEntry
model rely on the timestamp field. Adding an index will ensure
reasonable scalability for large audit logs.
2022-05-31 09:01:13 +02:00
Alieh Rymašeŭski
bcd0d43566
Add set_actor context manager ( #262 )
2022-05-24 09:33:54 +02:00
yeongkwang
32694b1324
Add register model using Django settings ( #368 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-05-23 10:02:22 +02:00
Saurabh Kumar
cdd9f40d84
Disable add button in admin ui
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-05-20 22:13:47 +02:00
Christian Barra
a93f53962a
Skip stringify if json ( #355 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-05-10 05:53:18 +02:00
Hasan Ramezani
e39fab3b83
Remove default_app_config configuration
2022-05-02 14:48:58 +02:00
Hasan Ramezani
de0625b378
Drop Django 2.2 support.
2022-05-01 13:48:26 +02:00
Amin Alaee
bb5f99533e
Add mask_fields argument in register ( #310 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-03-10 14:17:50 +01:00
Samuel Gonçalves
77ef852706
enable use of replica database ( #359 )
...
* enable use of replica database
When you use replica database the django-auditlog try to write in the same database where object was read (replica). But this is a read only database and crash the application.
This changes saves always in the default database.
If you want to save in multiple databases or in a special one use `DATABASE_ROUTERS` to configure it.
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-03-07 14:22:08 +01:00
Hasan Ramezani
505ee8d054
Fix black error.
2022-01-12 10:10:52 +01:00
Paul Backhouse
ffd8bb1e85
Apply default_auto_field to app config.
2022-01-11 10:42:05 +01:00
Hasan Ramezani
f003f3332a
Update syntax to Python 3.7+
2022-01-10 10:18:20 +01:00
Hasan Ramezani
1d27bc3a04
Remove extra imports.
2022-01-10 10:18:20 +01:00
François Magimel
2e9668dc05
build: replace django-jsonfield with django-jsonfield-backport ( #339 )
...
The `django-jsonfield` module is not maintained anymore and raises some
errors with Django 4.0. So, as a recommendation in this package, and as
Django 2.2 is still maintained, `django-jsonfield-backport` will do the
job for the `JSONField` field.
Ref #43
Ref #334
2022-01-07 22:14:36 +01:00
Abdullah Elkady
54dc20e920
Support Django's save method update_fields kwarg ( #336 )
2022-01-07 14:23:37 +01:00
Basti
05c280575f
replace ugettext with gettext for django4
2022-01-07 08:36:23 +01:00
m.babapoor@parspooyesh.com
33620c30a7
Add actor username to search fields
2022-01-06 16:53:51 +01:00
m.babapoor@parspooyesh.com
194e1e4c93
Add content type to resource field
2022-01-05 21:04:42 +01:00
Andreas Hasenkopf
938431389f
Add a DB index to LogEntry's action field ( #236 )
...
For some applications the possibility to filter by the `action` field might be really interesting. However the lack of an index can lead to severe reduction of such queries.
The simplest solution: Let's a DB index on that field :)
2022-01-04 10:06:45 +01:00
Panagiotis Simakis
457b04b448
Replace deprecated smart_text() with smart_str().
2021-05-25 00:50:02 +02:00
Hasan Ramezani
6131430ff7
Change relative imports to absolute.
2020-12-06 23:10:18 +01:00
Hasan Ramezani
497c83fc83
Add isort and sort orders with isort.
2020-12-06 23:10:18 +01:00
Hasan Ramezani
f5bb5cb1a2
Add black and format files with black.
2020-12-06 23:10:18 +01:00
Jannis Leidel
50da34125c
Simplified travis config and added Jazzband release config. ( #281 )
...
* Simplified travis config and added Jazzband release config.
* Migrate to travis-ci.com.
* Split requirements to prevent env spoilage.
* Add docs requirements.
* Huh
* type
* Add psycopg2 doc requirements.
2020-11-25 22:15:14 +01:00
Jan-Jelle Kester
565239180e
Review improvements
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
346105dcf9
Use more generic .pk to get primary key instead of .id
...
Fixes #140
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
f4edfc0592
Management command improvements
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
f14f6b34ee
Remove stale code
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
469fe362de
Code improvements
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
2010b49d06
Fix Django 3.0 field choices diff
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
3acab4322b
Drop Python 2, support Django 3.0, update dependencies
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
ee8a700b1b
Clean up project structure
2020-09-07 16:52:32 +02:00
Jan-Jelle Kester
81098cd179
Big commit: testproject, bugfixes, changed directory structure
2013-10-21 21:46:31 +02:00
Jan-Jelle Kester
db8529b773
Make LogEntry and middleware compatible with custom user models
2013-10-20 19:24:33 +02:00
Jan-Jelle Kester
9a13a5966f
First implementation
2013-10-20 15:25:48 +02:00