File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 66
77from django .conf import settings
88from django .utils .functional import lazy
9- from django .utils .timezone import is_naive , make_aware , utc
10- from six import string_types
9+ from django .utils .timezone import is_naive , make_aware
1110
1211from ninja_jwt import exceptions
1312
13+ try :
14+ from datetime .timezone import utc
15+ except ImportError :
16+ from django .utils .timezone import utc
17+
18+
1419logger = logging .getLogger ("django" )
1520
1621
@@ -32,7 +37,7 @@ def import_callable(path_or_callable):
3237 if callable (path_or_callable ):
3338 return path_or_callable
3439 else :
35- assert isinstance (path_or_callable , string_types )
40+ assert isinstance (path_or_callable , str )
3641 package , attr = path_or_callable .rsplit ("." , 1 )
3742 packages = import_module (package )
3843 return getattr (packages , attr )
You can’t perform that action at this time.
0 commit comments