web/ldtplatform/settings.py
changeset 188 74bad93d3cb7
parent 183 89334901b7c2
child 228 94fdb72b7d56
--- a/web/ldtplatform/settings.py	Thu Sep 29 12:43:52 2011 +0200
+++ b/web/ldtplatform/settings.py	Thu Sep 29 12:54:55 2011 +0200
@@ -1,5 +1,6 @@
 #@PydevCodeAnalysisIgnore
 import os.path
+import ldtplatform
 # Django settings for project.
 
 DEBUG = True
@@ -37,6 +38,7 @@
 
 LANGUAGES = ( 
     ('fr', ugettext('French')),
+    ('en', ugettext('English')),
 )
 
 
@@ -82,9 +84,10 @@
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'django.middleware.locale.LocaleMiddleware',
+    #'django.middleware.locale.LocaleMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django_openid_consumer.middleware.OpenIDMiddleware',
+    'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = ( 
@@ -94,20 +97,20 @@
     "django.core.context_processors.i18n",
     "django.core.context_processors.media",
     "django.core.context_processors.static",
-    "ldt.utils.context_processors.ldtcontext",
+    "ldt.utils.context_processors.ldt_context",
 )
 
 
-
 ROOT_URLCONF = 'ldtplatform.urls'
 
 TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    os.path.join(os.path.basename(__file__), 'templates'),
+    os.path.join(os.path.basename(__file__), 'templates'), 
+    os.path.join(os.path.dirname(__file__), 'templates'),  
 )
-
+    
 FIXTURES_DIRS = (
     os.path.join(os.path.basename(__file__), 'fixtures'),
 )
@@ -137,6 +140,8 @@
     'south',
 )
 
+AUTH_PROFILE_MODULE = 'user.UserProfile'
+
 DECOUPAGE_BLACKLIST = (
      "de_PPP",
 )
@@ -183,8 +188,22 @@
 SOCIAL_AUTH_COMPLETE_URL_NAME  = 'complete'
 SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete'
 
+# twitter testing
+TEST_TWITTER_USER = 'jacquesverrier@gmail.com'
+TEST_TWITTER_PASSWORD = ''
+
+# facebook testing
+#TEST_FACEBOOK_USER = 'testing_account'
+#TEST_FACEBOOK_PASSWORD = 'password_for_testing_account'
+
+# google testing
+TEST_GOOGLE_USER = 'jacquesverrier@gmail.com'
+TEST_GOOGLE_PASSWORD = ''
+
 AUTO_INDEX_AFTER_SAVE = True
 
+WEB_VERSION = ldtplatform.get_version()
+
 from config import *
 
 if not "LOGIN_URL" in locals():
@@ -205,7 +224,6 @@
     GLOBAL_LOG_LEVEL = LOG_LEVEL
 if not "GLOBAL_LOG_HANDLERS" in locals():
     GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
-    
 
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
@@ -218,3 +236,4 @@
 # URL that handles the media served from MEDIA_ROOT.
 if not "MEDIA_URL" in locals():
     MEDIA_URL = BASE_URL + 'static/media/'
+