diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0931a5e..9d89f77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,12 +10,12 @@ jobs: fail-fast: false matrix: python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3'] - django-version: ['2.2', '3.1'] + django-version: ['2.2', '3.1', '3.2'] # Tox configuration for QA environment include: - python-version: '3.8' django-version: 'qa' - # Django >= 3.2 only supports >= Python 3.8 + # Django > 3.2 only supports >= Python 3.8 - python-version: '3.8' django-version: 'main' experimental: true diff --git a/CHANGES.rst b/CHANGES.rst index 2e9dfa6..0ad28ec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,7 +9,8 @@ WIP [ashokdelphia] - Remove support for Django 3.0 [hramezani] - +- Add support for Django 3.2 + [hramezani] 5.13.1 (2021-02-22) diff --git a/axes/handlers/cache.py b/axes/handlers/cache.py index 06da63c..b5bf6fc 100644 --- a/axes/handlers/cache.py +++ b/axes/handlers/cache.py @@ -11,7 +11,7 @@ from axes.helpers import ( get_credentials, get_failure_limit, ) -from axes.models import AccessBase +from axes.models import AccessAttempt from axes.signals import user_locked_out log = getLogger(__name__) @@ -44,7 +44,9 @@ class AxesCacheHandler(AbstractAxesHandler, AxesBaseHandler): ) cache_keys.extend( - get_client_cache_key(AccessBase(username=username, ip_address=ip_address)) + get_client_cache_key( + AccessAttempt(username=username, ip_address=ip_address) + ) ) for cache_key in cache_keys: diff --git a/pyproject.toml b/pyproject.toml index c001515..82d9b0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ DJANGO_SETTINGS_MODULE = "tests.settings" legacy_tox_ini = """ [tox] envlist = - py{36,37,38,39,py3}-dj{22,31} + py{36,37,38,39,py3}-dj{22,31,32} py{38,39}-djmain py38-djqa @@ -26,6 +26,7 @@ python = DJANGO = 2.2: dj22 3.1: dj31 + 3.2: dj32 main: djmain qa: djqa @@ -35,6 +36,7 @@ deps = -r requirements-test.txt dj22: django>=2.2,<2.3 dj31: django>=3.1,<3.2 + dj32: django>=3.2,<3.3 djmain: https://github.com/django/django/archive/main.tar.gz usedevelop = true commands = pytest diff --git a/setup.py b/setup.py index 87a83a1..884f428 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ setup( "Framework :: Django", "Framework :: Django :: 2.2", "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License",