Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd3b47c

Browse files
committed
Merge pull request#4025 from dnit/master
type('') to str
2 parents3d3b064 +09aa8f7 commitdd3b47c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎rest_framework/authentication.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
fromdjango.contrib.authimportauthenticate,get_user_model
99
fromdjango.middleware.csrfimportCsrfViewMiddleware
10+
fromdjango.utils.siximportstring_types
1011
fromdjango.utils.translationimportugettext_lazyas_
1112

1213
fromrest_frameworkimportHTTP_HEADER_ENCODING,exceptions
@@ -19,7 +20,7 @@ def get_authorization_header(request):
1920
Hide some test client ickyness where the header can be unicode.
2021
"""
2122
auth=request.META.get('HTTP_AUTHORIZATION',b'')
22-
ifisinstance(auth,type('')):
23+
ifisinstance(auth,string_types):
2324
# Work around django test client oddness
2425
auth=auth.encode(HTTP_HEADER_ENCODING)
2526
returnauth

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp