Permalink
Browse files

Avoid settings access on installation by removing them from __init__.…

…py. Refs #770
  • Loading branch information...
1 parent f3b4f9b commit 06d8c297ea851ff6fb236bc7b9fe9b8d40480789 @omab committed Sep 18, 2013
Showing with 11 additions and 12 deletions.
  1. +0 −8 social_auth/__init__.py
  2. +6 −2 social_auth/admin.py
  3. +5 −2 social_auth/models.py
View
@@ -2,13 +2,5 @@
Django-social-auth application, allows OpenId or OAuth user
registration/authentication just adding a few configurations.
"""
-from django.conf import settings
-
-
version = (0, 8, 0)
__version__ = '.'.join(map(str, version))
-
-
-MODELS = getattr(settings, 'SOCIAL_AUTH_MODELS',
- 'social_auth.db.django_models')
-IS_DJANGO_MODELS = MODELS == 'social_auth.db.django_models'
View
@@ -1,6 +1,10 @@
-from social_auth import IS_DJANGO_MODELS
+from django.conf import settings
-if IS_DJANGO_MODELS:
+MODELS = getattr(settings, 'SOCIAL_AUTH_MODELS',
+ 'social_auth.db.django_models')
+
+
+if MODELS == 'social_auth.db.django_models':
from social.apps.django_app.default import admin
admin # placate pyflakes
View
@@ -1,7 +1,10 @@
-from social_auth import IS_DJANGO_MODELS
+from django.conf import settings
+MODELS = getattr(settings, 'SOCIAL_AUTH_MODELS',
+ 'social_auth.db.django_models')
-if IS_DJANGO_MODELS:
+
+if MODELS == 'social_auth.db.django_models':
from social.apps.django_app.default.models import \
UserSocialAuth as UserSocialAuthBase, \
Nonce as NonceBase, \

0 comments on commit 06d8c29

Please sign in to comment.