From: Matías Aguirre Date: Fri, 24 Feb 2012 11:33:39 +0000 (-0200) Subject: PEP8 and use dsa setting util X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=beeb93a39ba9555d48b58d22074b7bb9ac74a563;p=django-social-auth.git PEP8 and use dsa setting util --- diff --git a/social_auth/backends/contrib/fitbit.py b/social_auth/backends/contrib/fitbit.py index 5084fa6..031f91a 100644 --- a/social_auth/backends/contrib/fitbit.py +++ b/social_auth/backends/contrib/fitbit.py @@ -15,18 +15,18 @@ except ImportError: # fall back for Python 2.5 from cgi import parse_qs -from django.conf import settings -from django.utils import simplejson - from oauth2 import Token + +from social_auth.utils import setting from social_auth.backends import ConsumerBasedOAuth, OAuthBackend, USERNAME + # Fitbit configuration FITBIT_SERVER = 'https://api.fitbit.com' FITBIT_REQUEST_TOKEN_URL = '%s/oauth/request_token' % FITBIT_SERVER FITBIT_AUTHORIZATION_URL = '%s/oauth/authorize' % FITBIT_SERVER FITBIT_ACCESS_TOKEN_URL = '%s/oauth/access_token' % FITBIT_SERVER -EXPIRES_NAME = getattr(settings, 'SOCIAL_AUTH_EXPIRATION', 'expires') +EXPIRES_NAME = setting('SOCIAL_AUTH_EXPIRATION', 'expires') class FitbitBackend(OAuthBackend):