web/ldtplatform/settings.py
changeset 6 6befc470b1e6
parent 4 238f3cd543f2
equal deleted inserted replaced
5:17b1be7486d8 6:6befc470b1e6
     1 #@PydevCodeAnalysisIgnore
     1 #@PydevCodeAnalysisIgnore
     2 import os.path
     2 import os.path
     3 #import ldtplatform
     3 import ldtplatform
     4 VERSION = (0, 3, 0, "final", 0)
       
     5 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
       
     6 def get_version():
       
     7     version = '%s.%s' % (VERSION[0], VERSION[1])
       
     8     if VERSION[2]:
       
     9         version = '%s.%s' % (version, VERSION[2])
       
    10     if VERSION[3:] == ('alpha', 0):
       
    11         version = '%s pre-alpha' % version
       
    12     else:
       
    13         if VERSION[3] != 'final':
       
    14             version = '%s %s %s' % (version, VERSION[3], VERSION[4])
       
    15     return version
       
    16 __version__ = get_version()
       
    17 
       
    18 # Django settings for project.
     4 # Django settings for project.
    19 
     5 
    20 DEBUG = True
     6 DEBUG = True
    21 TEMPLATE_DEBUG = DEBUG
     7 TEMPLATE_DEBUG = DEBUG
    22 
     8 
   113     "django.core.context_processors.static",
    99     "django.core.context_processors.static",
   114     "ldt.utils.context_processors.ldt_context",
   100     "ldt.utils.context_processors.ldt_context",
   115 )
   101 )
   116 
   102 
   117 
   103 
   118 #ROOT_URLCONF = 'ldtplatform.urls'
   104 ROOT_URLCONF = 'ldtplatform.urls'
   119 ROOT_URLCONF = 'urls'
       
   120 
   105 
   121 TEMPLATE_DIRS = (
   106 TEMPLATE_DIRS = (
   122     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
   107     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
   123     # Always use forward slashes, even on Windows.
   108     # Always use forward slashes, even on Windows.
   124     # Don't forget to use absolute paths, not relative paths.
   109     # Don't forget to use absolute paths, not relative paths.
   137     'django.contrib.sessions',
   122     'django.contrib.sessions',
   138     'django.contrib.sites',
   123     'django.contrib.sites',
   139     'django.contrib.messages',
   124     'django.contrib.messages',
   140     'django.contrib.admin',
   125     'django.contrib.admin',
   141     'django.contrib.staticfiles',
   126     'django.contrib.staticfiles',
   142     #'ldtplatform',
   127     'ldtplatform',
   143     'registration',
   128     'registration',
   144     'tagging',
   129     'tagging',
   145     'ldt',
   130     'ldt',
   146     'ldt.core',
   131     'ldt.core',
   147     'ldt.ldt_utils',
   132     'ldt.ldt_utils',
   215 TEST_GOOGLE_USER = 'jacquesverrier@gmail.com'
   200 TEST_GOOGLE_USER = 'jacquesverrier@gmail.com'
   216 TEST_GOOGLE_PASSWORD = ''
   201 TEST_GOOGLE_PASSWORD = ''
   217 
   202 
   218 AUTO_INDEX_AFTER_SAVE = True
   203 AUTO_INDEX_AFTER_SAVE = True
   219 
   204 
   220 #WEB_VERSION = ldtplatform.get_version()
   205 WEB_VERSION = ldtplatform.get_version()
   221 WEB_VERSION = get_version()
       
   222 
   206 
   223 from config import *
   207 from config import *
   224 
   208 
   225 if not "LOGIN_URL" in locals():
   209 if not "LOGIN_URL" in locals():
   226     LOGIN_URL = BASE_URL + 'accounts/login/'
   210     LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/'
   227 if not "LOGOUT_URL" in locals():
   211 if not "LOGOUT_URL" in locals():
   228     LOGOUT_URL = BASE_URL + 'accounts/disconnect/'
   212     LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/disconnect/'
   229 if not "LOGIN_REDIRECT_URL" in locals():
   213 if not "LOGIN_REDIRECT_URL" in locals():
   230     LOGIN_REDIRECT_URL = BASE_URL + 'ldt/'
   214     LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform/ldt/'
   231 if not "LOGOUT_REDIRECT_URL" in locals():
   215 if not "LOGOUT_REDIRECT_URL" in locals():
   232     LOGOUT_REDIRECT_URL = BASE_URL + 'accounts/login'
   216     LOGOUT_REDIRECT_URL = BASE_URL + 'ldtplatform/accounts/login'
   233 if not "PROFILE_REDIRECT_URL" in locals():
   217 if not "PROFILE_REDIRECT_URL" in locals():
   234     PROFILE_REDIRECT_URL = BASE_URL + 'auth_accounts/create/profile'
   218     PROFILE_REDIRECT_URL = BASE_URL + 'ldtplatform/auth_accounts/create/profile'
   235 
   219 
   236 if not "LOGIN_ERROR_URL" in locals():
   220 if not "LOGIN_ERROR_URL" in locals():
   237     LOGIN_ERROR_URL = BASE_URL + 'accounts/login'
   221     LOGIN_ERROR_URL = BASE_URL + 'ldtplatform/accounts/login'
   238 
   222 
   239 if not "GLOBAL_LOG_LEVEL" in locals():
   223 if not "GLOBAL_LOG_LEVEL" in locals():
   240     GLOBAL_LOG_LEVEL = LOG_LEVEL
   224     GLOBAL_LOG_LEVEL = LOG_LEVEL
   241 if not "GLOBAL_LOG_HANDLERS" in locals():
   225 if not "GLOBAL_LOG_HANDLERS" in locals():
   242     GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
   226     GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]