Skip to content

Commit

Permalink
Drop Django 2.2 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored and Linkid committed May 1, 2022
1 parent 8a5fa3f commit de0625b
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#### Improvements
- feat: enable use of replica database (delegating the choice to `DATABASES_ROUTER`) ([#359](https://github.com/jazzband/django-auditlog/pull/359))
- Add `mask_fields` argument in `register` to mask sensitive information when logging ([#3710](https://github.com/jazzband/django-auditlog/pull/310))
- Django: Drop 2.2 support. `django_jsonfield_backport` is not required anymore ([#370](https://github.com/jazzband/django-auditlog/pull/370))

#### Important notes
- LogEntry no longer save to same database instance is using
Expand Down
5 changes: 2 additions & 3 deletions auditlog/migrations/0004_logentry_detailed_object_repr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import migrations
from django_jsonfield_backport.models import JSONField
from django.db import migrations, models


class Migration(migrations.Migration):
Expand All @@ -12,6 +11,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="logentry",
name="additional_data",
field=JSONField(null=True, blank=True),
field=models.JSONField(null=True, blank=True),
),
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import migrations
from django_jsonfield_backport.models import JSONField
from django.db import migrations, models


class Migration(migrations.Migration):
Expand All @@ -12,6 +11,8 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="logentry",
name="additional_data",
field=JSONField(null=True, verbose_name="additional data", blank=True),
field=models.JSONField(
null=True, verbose_name="additional data", blank=True
),
),
]
7 changes: 4 additions & 3 deletions auditlog/migrations/0009_alter_logentry_additional_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import migrations
from django_jsonfield_backport.models import JSONField
from django.db import migrations, models


class Migration(migrations.Migration):
Expand All @@ -12,6 +11,8 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="logentry",
name="additional_data",
field=JSONField(blank=True, null=True, verbose_name="additional data"),
field=models.JSONField(
blank=True, null=True, verbose_name="additional data"
),
),
]
3 changes: 1 addition & 2 deletions auditlog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from django.utils import formats, timezone
from django.utils.encoding import smart_str
from django.utils.translation import gettext_lazy as _
from django_jsonfield_backport.models import JSONField


class LogEntryManager(models.Manager):
Expand Down Expand Up @@ -222,7 +221,7 @@ class Action:
blank=True, null=True, verbose_name=_("remote address")
)
timestamp = models.DateTimeField(auto_now_add=True, verbose_name=_("timestamp"))
additional_data = JSONField(
additional_data = models.JSONField(
blank=True, null=True, verbose_name=_("additional data")
)

Expand Down
1 change: 0 additions & 1 deletion auditlog_tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"django.contrib.sessions",
"django.contrib.admin",
"django.contrib.staticfiles",
"django_jsonfield_backport",
"auditlog",
"auditlog_tests",
]
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ django>=3.2,<3.3
sphinx
sphinx_rtd_theme
psycopg2-binary
django-jsonfield-backport>=1.0.0
4 changes: 2 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The repository can be found at https://github.com/jazzband/django-auditlog/.
**Requirements**

- Python 3.7 or higher
- Django 2.2 or higher
- Django 3.2 or higher

Auditlog is currently tested with Python 3.7+ and Django 2.2, 3.2 and 4.0. The latest test report can be found
Auditlog is currently tested with Python 3.7+ and Django 3.2 and 4.0. The latest test report can be found
at https://github.com/jazzband/django-auditlog/actions.

Adding Auditlog to your Django application
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
description="Audit log app for Django",
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=["django-jsonfield-backport>=1.0.0", "python-dateutil>=2.6.0"],
install_requires=["python-dateutil>=2.6.0"],
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3",
Expand All @@ -36,7 +36,6 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"License :: OSI Approved :: MIT License",
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
envlist =
{py37,py38,py39}-django22
{py37,py38,py39,py10}-django32
{py38,py39,py10}-django{40,main}
py38-docs
Expand All @@ -11,7 +10,6 @@ commands =
coverage run --source auditlog runtests.py
coverage xml
deps =
django22: Django>=2.2,<2.3
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
djangomain: https://github.com/django/django/archive/main.tar.gz
Expand Down

0 comments on commit de0625b

Please sign in to comment.