From c83c93d9fc5149b48d563d1bd281c5aa33bf6b97 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 4 Oct 2021 15:49:28 +0100 Subject: [PATCH] Added support for Django 4.0 --- .github/workflows/python-package.yml | 6 ++++++ reversion/admin.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90944031..44b045d4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -43,12 +43,18 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8, 3.9] django-version: + - '>=4.0a1,<4.1' - '>=3.2,<4.0' - '>=3.1,<3.2' - '>=3.0,<3.1' - '>=2.2,<3.0' - '>=2.1,<2.2' - '>=2.0,<2.1' + exclude: + - python-version: 3.6 + django-version: '>=4.0a1,<4.1' + - python-version: 3.7 + django-version: '>=4.0a1,<4.1' steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/reversion/admin.py b/reversion/admin.py index 1997ccec..7fe4e5ec 100644 --- a/reversion/admin.py +++ b/reversion/admin.py @@ -10,7 +10,7 @@ from django.urls import reverse, re_path from django.utils.text import capfirst from django.utils.timezone import template_localtime -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.utils.encoding import force_str from django.utils.formats import localize from reversion.errors import RevertError