Commits

offline committed cce0ab8

name errors fixed

  • Participants
  • Parent commits 10e48b3

Comments (0)

Files changed (3)

File openauth/backends/__init__.py

 
 class BaseBackend(forms.Form):
 
-    PROFILE_MAPPING = property(lambda self: getattr(global_settings, "%s_PROFILE_MAPPING" % self.privider.upper(), {}))
+    PROFILE_MAPPING = property(lambda self: getattr(global_settings, "%s_PROFILE_MAPPING" % self.provider.upper(), {}))
 
     def __init__(self, *args, **kwargs):
         self._identity = None

File openauth/backends/twitter.py

 
 class TwitterBackend(BaseBackend):
 
-    CONSUMER_KEY = property(lambda self: getattr(global_settings, "%s_CONSUMER_KEY" % self.privider.upper()))
-    CONSUMER_SECRET = property(lambda self: getattr(global_settings, "%s_CONSUMER_SECRET" % self.privider.upper()))
-    REQUEST_TOKEN_URL = property(lambda self: getattr(global_settings, "%s_REQUEST_TOKEN_URL" % self.privider.upper()))
-    ACCESS_TOKEN_URL = property(lambda self: getattr(global_settings, "%s_ACCESS_TOKEN_URL" % self.privider.upper()))
-    AUTHORIZE_URL = property(lambda self: getattr(global_settings, "%s_AUTHORIZE_URL" % self.privider.upper()))
+    CONSUMER_KEY = property(lambda self: getattr(global_settings, "%s_CONSUMER_KEY" % self.provider.upper()))
+    CONSUMER_SECRET = property(lambda self: getattr(global_settings, "%s_CONSUMER_SECRET" % self.provider.upper()))
+    REQUEST_TOKEN_URL = property(lambda self: getattr(global_settings, "%s_REQUEST_TOKEN_URL" % self.provider.upper()))
+    ACCESS_TOKEN_URL = property(lambda self: getattr(global_settings, "%s_ACCESS_TOKEN_URL" % self.provider.upper()))
+    AUTHORIZE_URL = property(lambda self: getattr(global_settings, "%s_AUTHORIZE_URL" % self.provider.upper()))
 
     def clean(self):
         consumer = OAuthConsumer(self.CONSUMER_KEY, self.CONSUMER_SECRET)

File openauth/forms.py

 
 class SocialIDExtraForm(forms.Form):
     def __init__(self, *args, **kwargs):
-        fields = kwargs.pop("fields", None)
-        for key, value in fields:
+        fields = kwargs.pop("fields", {})
+        for key, value in fields.items():
             self.base_fields[key] = value
         super(SocialIDExtraForm, self).__init__(*args, **kwargs)