From d4f011e49387075ac7ec2aa7072550c9af5acc57 Mon Sep 17 00:00:00 2001 From: David Fischer Date: Tue, 18 Mar 2014 15:57:33 +0100 Subject: [PATCH] Replace deprecated mimetype by content_type --- provider/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/provider/views.py b/provider/views.py index dd1200df..161e5721 100644 --- a/provider/views.py +++ b/provider/views.py @@ -292,13 +292,13 @@ class Redirect(OAuthView, Mixin): an error. """ - def error_response(self, error, mimetype='application/json', status=400, + def error_response(self, error, content_type='application/json', status=400, **kwargs): """ 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=content_type, status=status, **kwargs) def get(self, request): @@ -457,13 +457,13 @@ def invalidate_access_token(self, access_token): """ raise NotImplementedError - def error_response(self, error, mimetype='application/json', status=400, + def error_response(self, error, content_type='application/json', status=400, **kwargs): """ 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=content_type, status=status, **kwargs) def access_token_response(self, access_token): @@ -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):