Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions provider/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def error_response(self, error, mimetype='application/json', status=400,
Return an error response to the client with default status code of
*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)

def get(self, request):
Expand Down Expand Up @@ -463,7 +463,7 @@ def error_response(self, error, mimetype='application/json', status=400,
Return an error response to the client with default status code of
*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)

def access_token_response(self, access_token):
Expand All @@ -488,7 +488,7 @@ def access_token_response(self, access_token):
pass

return HttpResponse(
json.dumps(response_data), mimetype='application/json'
json.dumps(response_data), content_type='application/json'
)

def authorization_code(self, request, data, client):
Expand Down