Skip to content

Commit 4b91c25

Browse files
committed
django4 support
1 parent 0726dd9 commit 4b91c25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rest_framework_sso/authentication.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
import jwt.exceptions
55
from django.utils.encoding import smart_str
6-
from django.utils.translation import ugettext as _
6+
try:
7+
from django.utils.translation import gettext_lazy as _
8+
except ImportError:
9+
from django.utils.translation import ugettext as _
710
from rest_framework import exceptions
811
from rest_framework.authentication import BaseAuthentication, get_authorization_header
912

0 commit comments

Comments
 (0)