diff -r 2e2989c3072c -r 125fc6df230d web/ldtplatform/settings.py --- a/web/ldtplatform/settings.py Wed Mar 23 17:34:36 2011 +0100 +++ b/web/ldtplatform/settings.py Fri Apr 08 16:33:01 2011 +0200 @@ -1,5 +1,6 @@ #@PydevCodeAnalysisIgnore import os.path +from social_auth_settings import * # Django settings for project. DEBUG = True @@ -89,13 +90,15 @@ "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", - "ldt.utils.context_processors.ldt", - "ldt.utils.context_processors.base", - "ldt.utils.context_processors.web", - "ldtplatform.utils.context_processors.version", +# "ldt.utils.context_processors.ldt", +# "ldt.utils.context_processors.base", +# "ldt.utils.context_processors.web", + #"ldtplatform.utils.context_processors.version", + "ldt.utils.context_processors.ldtcontext", ) + ROOT_URLCONF = 'ldtplatform.urls' TEMPLATE_DIRS = ( @@ -130,7 +133,8 @@ 'oauth_provider', 'openid_consumer', 'piston', - 'socialauth', + #'socialauth', + 'social_auth', ) DECOUPAGE_BLACKLIST = ( @@ -141,6 +145,23 @@ "__MACOSX", ) +AUTHENTICATION_BACKENDS = ( + 'social_auth.backends.twitter.TwitterBackend', + 'social_auth.backends.facebook.FacebookBackend', +# 'social_auth.backends.google.GoogleOAuthBackend', +# 'social_auth.backends.google.GoogleOAuth2Backend', + 'social_auth.backends.google.GoogleBackend', + 'social_auth.backends.yahoo.YahooBackend', +# 'social_auth.backends.contrib.linkedin.LinkedinBackend', +# 'social_auth.backends.contrib.LiveJournalBackend', +# 'social_auth.backends.contrib.orkut.OrkutBackend', + 'social_auth.backends.OpenIDBackend', + 'django.contrib.auth.backends.ModelBackend', +) +SOCIAL_AUTH_IMPORT_BACKENDS = ( + 'myproy.social_auth_extra_services', +) + ACCOUNT_ACTIVATION_DAYS = 7 LDT_MAX_SEARCH_NUMBER = 50 @@ -152,17 +173,25 @@ OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256 OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view' OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view' -TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8000" +TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888" from config import * -from socialauthsettings import * +#from socialauthsettings import * LOGIN_URL = BASE_URL + 'accounts/login/' -LOGOUT_URL = BASE_URL + 'accounts/logout/' +LOGOUT_URL = BASE_URL + 'accounts/disconnect/' #LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform' LOGIN_REDIRECT_URL = BASE_URL + 'ldt/' LOGOUT_REDIRECT_URL = BASE_URL + 'accounts/login' -PROFILE_REDIRECT_URL = BASE_URL + 'accounts/create/profile' +PROFILE_REDIRECT_URL = BASE_URL + 'auth_accounts/create/profile' + +LOGIN_ERROR_URL = BASE_URL + 'accounts/login' + +FACEBOOK_APP_ID = '163134140411313' +FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012' + +SOCIAL_AUTH_COMPLETE_URL_NAME = 'complete' +SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete' GLOBAL_LOG_LEVEL = LOG_LEVEL GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]