diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 0655ee8c..beb6dcdf 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -83,11 +83,12 @@ jobs: - name: Run tests run: make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./coverage.xml fail_ci_if_error: true verbose: true + token: ${{ secrets.CODECOV_TOKEN }} code-quality: strategy: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 57323a98..cf2ab520 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,7 @@ This document records all notable changes to djoser. This project adheres to `Semantic Versioning `_. --------------------- -`2.2.3`_ (2024-05-01) +`2.2.3`_ (2024-05-03) --------------------- * add support for protocol, domain and site name customization in the email contents https://github.com/sunscrapers/djoser/issues/781 @@ -440,3 +440,4 @@ few bugfixes / documentation updates. List of changes: .. _2.2.0: https://github.com/sunscrapers/djoser/compare/2.1.0...2.2.0 .. _2.2.1: https://github.com/sunscrapers/djoser/compare/2.2.0...2.2.1 .. _2.2.2: https://github.com/sunscrapers/djoser/compare/2.2.1...2.2.2 +.. _2.2.3: https://github.com/sunscrapers/djoser/compare/2.2.2...2.2.3 diff --git a/djoser/constants.py b/djoser/constants.py index 6df3a5d9..57be35d4 100644 --- a/djoser/constants.py +++ b/djoser/constants.py @@ -3,6 +3,9 @@ class Messages: INVALID_CREDENTIALS_ERROR = _("Unable to log in with provided credentials.") + INACTIVE_ACCOUNT_ERROR = _( + "User account is disabled." + ) # not in use since Django 1.10 INVALID_TOKEN_ERROR = _("Invalid token for given user.") INVALID_UID_ERROR = _("Invalid user id or user doesn't exist.") STALE_TOKEN_ERROR = _("Stale token for given user.") diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index c10e8bf2..b39464ac 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -6,7 +6,6 @@ Available endpoints * ``/users/`` * ``/users/me/`` -* ``/users/confirm/`` * ``/users/resend_activation/`` * ``/users/set_password/`` * ``/users/reset_password/`` @@ -76,7 +75,7 @@ Configure ``urls.py``: urlpatterns = [ (...), - url(r'^auth/', include('djoser.urls')), + re_path(r'^auth/', include('djoser.urls')), ] HTTP Basic Auth strategy is assumed by default as Django Rest Framework does it. diff --git a/testproject/testapp/tests/test_token_create.py b/testproject/testapp/tests/test_token_create.py index 50b9ceae..889a958a 100644 --- a/testproject/testapp/tests/test_token_create.py +++ b/testproject/testapp/tests/test_token_create.py @@ -49,7 +49,7 @@ def test_post_should_not_login_if_user_is_not_active(self): self.assert_status_equal(response, status.HTTP_400_BAD_REQUEST) self.assertEqual( - response.data["non_field_errors"], + response.data["non_field_errors"][0], settings.CONSTANTS.messages.INVALID_CREDENTIALS_ERROR, ) self.assertFalse(self.signal_sent)