* Disable logging remote IP address
* Update auditlog/middleware.py
* Update CHANGELOG.md
* Update auditlog/middleware.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update auditlog/middleware.py and add tests in ManyRelatedModelTest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The code example for AUDITLOG_INCLUDE_TRACKING_MODELS made two distinct references to "model1" which seems to be a typo, should read "model2" on the second reference
* Disable on raw save prototype
* Contextmanager to disable instead of just raw - so we can catch m2m relations too
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
The doc is build with python 3.8, which includes the `importlib` API to
get the package version. Its use is recommended by `setuptools-scm` for
the doc.
* Initial GitHub Actions workflow.
* Use correct Postgres port.
* Fix duplicate.
* Use POSTGRES_HOST?
* Fixing postgres config?
* Pass test env vars with Tox.
* Work around issue with Django 3.1.
* Write coverage file.
* Add release workflow.
* Remove Travis config file.
* Update .github/workflows/test.yml
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update auditlog_tests/tests.py
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update .github/workflows/test.yml
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update README.md
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Add Django 3.1 to tox config.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Fixes#93 - Add 'changes_display_dict' property to 'LogEntry' model to display diff in a more human readable format
'changes_display_dict' currently handles fields with choices, long textfields and charfields, datefields, timefields, and datetimefields. Supports `django-multiselectfield` with choices and Postgres's ArrayField with choices.
Textfields and Charfields longer than 140 characters are truncated with an ellipsis appended.
Date, Time and DateTime fields are rendered according to `L10N`, or if turned off fall back on Django settings defaults for DATE_FORMAT, TIME_FORMAT and DATETIME_FORMAT.
A new kwarg was added to 'AuditlogModelRegistry' called 'mapping_fields'. The kwarg allows the user to map the fields in the model to a more human readable or intuitive name. If a field isn't mapped it will default to the `verbose_name` as defined on the model or the Django default `verbose_name`. Partial mapping is supported, all fields do not need to be mapped to use the feature.
* Add django-multiselectfield test dep
* Add psycopg2 test dep
* Add postgres testing database and router
* Add postgres support to travis builds
* Add support for multiple databases. LogEntry saves to same database of the model its associated to
* If any literal evals fail default to None
* Add support for Postgres ArrayField in changes_display_dict
* Revert to old travis image while they are fixing issues with it
* Update docs
* Add full test coverage