web/ldtplatform/settings.py
changeset 56 125fc6df230d
parent 55 2e2989c3072c
child 57 795f01224eef
equal deleted inserted replaced
55:2e2989c3072c 56:125fc6df230d
     1 #@PydevCodeAnalysisIgnore
     1 #@PydevCodeAnalysisIgnore
     2 import os.path
     2 import os.path
       
     3 from social_auth_settings import *
     3 # Django settings for project.
     4 # Django settings for project.
     4 
     5 
     5 DEBUG = True
     6 DEBUG = True
     6 TEMPLATE_DEBUG = DEBUG
     7 TEMPLATE_DEBUG = DEBUG
     7 
     8 
    87     "django.core.context_processors.request",
    88     "django.core.context_processors.request",
    88     "django.core.context_processors.auth",
    89     "django.core.context_processors.auth",
    89     "django.core.context_processors.debug",
    90     "django.core.context_processors.debug",
    90     "django.core.context_processors.i18n",
    91     "django.core.context_processors.i18n",
    91     "django.core.context_processors.media",
    92     "django.core.context_processors.media",
    92     "ldt.utils.context_processors.ldt",
    93 #    "ldt.utils.context_processors.ldt",
    93     "ldt.utils.context_processors.base",
    94 #    "ldt.utils.context_processors.base",
    94     "ldt.utils.context_processors.web",
    95 #    "ldt.utils.context_processors.web",
    95     "ldtplatform.utils.context_processors.version",
    96     #"ldtplatform.utils.context_processors.version",
       
    97     "ldt.utils.context_processors.ldtcontext",
    96 )
    98 )
       
    99 
    97 
   100 
    98 
   101 
    99 ROOT_URLCONF = 'ldtplatform.urls'
   102 ROOT_URLCONF = 'ldtplatform.urls'
   100 
   103 
   101 TEMPLATE_DIRS = (
   104 TEMPLATE_DIRS = (
   128     'ldt.user',
   131     'ldt.user',
   129     'ldt.management',
   132     'ldt.management',
   130     'oauth_provider',
   133     'oauth_provider',
   131     'openid_consumer',
   134     'openid_consumer',
   132     'piston',
   135     'piston',
   133     'socialauth',    
   136     #'socialauth',
       
   137     'social_auth',
   134 )
   138 )
   135 
   139 
   136 DECOUPAGE_BLACKLIST = (
   140 DECOUPAGE_BLACKLIST = (
   137      "de_PPP",
   141      "de_PPP",
   138 )
   142 )
   139  
   143  
   140 ZIP_BLACKLIST = (
   144 ZIP_BLACKLIST = (
   141      "__MACOSX",
   145      "__MACOSX",
       
   146 )
       
   147 
       
   148 AUTHENTICATION_BACKENDS = (
       
   149     'social_auth.backends.twitter.TwitterBackend',
       
   150     'social_auth.backends.facebook.FacebookBackend',
       
   151 #    'social_auth.backends.google.GoogleOAuthBackend',
       
   152 #    'social_auth.backends.google.GoogleOAuth2Backend',
       
   153     'social_auth.backends.google.GoogleBackend',
       
   154     'social_auth.backends.yahoo.YahooBackend',
       
   155 #    'social_auth.backends.contrib.linkedin.LinkedinBackend',
       
   156 #    'social_auth.backends.contrib.LiveJournalBackend',
       
   157 #    'social_auth.backends.contrib.orkut.OrkutBackend',
       
   158     'social_auth.backends.OpenIDBackend',
       
   159     'django.contrib.auth.backends.ModelBackend',
       
   160 )
       
   161 SOCIAL_AUTH_IMPORT_BACKENDS = (
       
   162     'myproy.social_auth_extra_services',
   142 )
   163 )
   143 
   164 
   144 ACCOUNT_ACTIVATION_DAYS = 7 
   165 ACCOUNT_ACTIVATION_DAYS = 7 
   145 
   166 
   146 LDT_MAX_SEARCH_NUMBER = 50
   167 LDT_MAX_SEARCH_NUMBER = 50
   150 OAUTH_PROVIDER_SECRET_SIZE = 32
   171 OAUTH_PROVIDER_SECRET_SIZE = 32
   151 OAUTH_PROVIDER_VERIFIER_SIZE = 10
   172 OAUTH_PROVIDER_VERIFIER_SIZE = 10
   152 OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256
   173 OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256
   153 OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view'
   174 OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view'
   154 OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view'
   175 OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view'
   155 TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8000"
   176 TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888"
   156 
   177 
   157 from config import *
   178 from config import *
   158 from socialauthsettings import *
   179 #from socialauthsettings import *
   159 
   180 
   160 LOGIN_URL = BASE_URL + 'accounts/login/'
   181 LOGIN_URL = BASE_URL + 'accounts/login/'
   161 LOGOUT_URL = BASE_URL + 'accounts/logout/'
   182 LOGOUT_URL = BASE_URL + 'accounts/disconnect/'
   162 #LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform'
   183 #LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform'
   163 LOGIN_REDIRECT_URL = BASE_URL + 'ldt/'
   184 LOGIN_REDIRECT_URL = BASE_URL + 'ldt/'
   164 LOGOUT_REDIRECT_URL = BASE_URL + 'accounts/login'
   185 LOGOUT_REDIRECT_URL = BASE_URL + 'accounts/login'
   165 PROFILE_REDIRECT_URL = BASE_URL + 'accounts/create/profile'
   186 PROFILE_REDIRECT_URL = BASE_URL + 'auth_accounts/create/profile'
       
   187 
       
   188 LOGIN_ERROR_URL = BASE_URL + 'accounts/login'
       
   189 
       
   190 FACEBOOK_APP_ID = '163134140411313'
       
   191 FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012'
       
   192 
       
   193 SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
       
   194 SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
   166 
   195 
   167 GLOBAL_LOG_LEVEL = LOG_LEVEL
   196 GLOBAL_LOG_LEVEL = LOG_LEVEL
   168 GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
   197 GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
   169 
   198