fixed views to use content type

This commit is contained in:
Mikela Clemmons 2014-08-25 12:42:35 -07:00
parent 11a63b0321
commit cc06cf0b26
1 changed files with 3 additions and 3 deletions

View File

@ -298,7 +298,7 @@ class Redirect(OAuthView, Mixin):
Return an error response to the client with default status code of Return an error response to the client with default status code of
*400* stating the error as outlined in :rfc:`5.2`. *400* stating the error as outlined in :rfc:`5.2`.
""" """
return HttpResponse(json.dumps(error), mimetype=mimetype, return HttpResponse(json.dumps(error), content_type=mimetype,
status=status, **kwargs) status=status, **kwargs)
def get(self, request): def get(self, request):
@ -463,7 +463,7 @@ class AccessToken(OAuthView, Mixin):
Return an error response to the client with default status code of Return an error response to the client with default status code of
*400* stating the error as outlined in :rfc:`5.2`. *400* stating the error as outlined in :rfc:`5.2`.
""" """
return HttpResponse(json.dumps(error), mimetype=mimetype, return HttpResponse(json.dumps(error), content_type=mimetype,
status=status, **kwargs) status=status, **kwargs)
def access_token_response(self, access_token): def access_token_response(self, access_token):
@ -488,7 +488,7 @@ class AccessToken(OAuthView, Mixin):
pass pass
return HttpResponse( return HttpResponse(
json.dumps(response_data), mimetype='application/json' json.dumps(response_data), content_type='application/json'
) )
def authorization_code(self, request, data, client): def authorization_code(self, request, data, client):