[Python-modules-commits] [python-social-auth] 23/71: Codestyle and missing docs

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.14
in repository python-social-auth.

commit cad745c83a2d22e828e98b7bbf39dde01a9c37b7
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date:   Mon Oct 5 10:50:28 2015 -0300

    Codestyle and missing docs
---
 docs/backends/justgiving.rst  |  5 ++++-
 social/backends/justgiving.py | 17 ++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/docs/backends/justgiving.rst b/docs/backends/justgiving.rst
index 52ca301..9a5fd6e 100644
--- a/docs/backends/justgiving.rst
+++ b/docs/backends/justgiving.rst
@@ -4,7 +4,10 @@ Just Giving
 OAuth2
 ------
 
-Add the Just Giving OAuth2 backend to your settings page::
+Follow the steps at `Just Giving API Docs`_ to register your
+application and get the needed keys.
+
+- Add the Just Giving OAuth2 backend to your settings page::
 
     SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
         ...
diff --git a/social/backends/justgiving.py b/social/backends/justgiving.py
index 78f7fa2..e5ced3e 100644
--- a/social/backends/justgiving.py
+++ b/social/backends/justgiving.py
@@ -30,14 +30,12 @@ class JustGivingOAuth2(BaseOAuth2):
     def user_data(self, access_token, *args, **kwargs):
         """Loads user data from service"""
         key, secret = self.get_key_and_secret()
-        return self.get_json(
-            self.USER_DATA_URL,
-            headers={
-                'Authorization': 'Bearer {0}'.format(access_token),
-                'Content-Type': 'application/json',
-                'x-application-key': secret,
-                'x-api-key': key
-            })
+        return self.get_json(self.USER_DATA_URL, headers={
+            'Authorization': 'Bearer {0}'.format(access_token),
+            'Content-Type': 'application/json',
+            'x-application-key': secret,
+            'x-api-key': key
+        })
 
     @handle_http_errors
     def auth_complete(self, *args, **kwargs):
@@ -54,4 +52,5 @@ class JustGivingOAuth2(BaseOAuth2):
             method=self.ACCESS_TOKEN_METHOD
         )
         self.process_error(response)
-        return self.do_auth(response['access_token'], response=response, *args, **kwargs)
\ No newline at end of file
+        return self.do_auth(response['access_token'], response=response,
+                            *args, **kwargs)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list