web/ldtplatform/settings.py
changeset 2 93d48df946cb
parent 0 bdf22b140727
child 6 7bc847aaccac
equal deleted inserted replaced
1:6a2a816d4ba3 2:93d48df946cb
       
     1 #@PydevCodeAnalysisIgnore
       
     2 import os.path
       
     3 # Django settings for project.
       
     4 
       
     5 DEBUG = True
       
     6 TEMPLATE_DEBUG = DEBUG
       
     7 
       
     8 ADMINS = (
       
     9     # ('Your Name', 'your_email@domain.com'),
       
    10 )
       
    11 
       
    12 MANAGERS = ADMINS
       
    13 
       
    14 DATABASES = {
       
    15     'default': {
       
    16         'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
       
    17         'NAME': '',                      # Or path to database file if using sqlite3.
       
    18         'USER': '',                      # Not used with sqlite3.
       
    19         'PASSWORD': '',                  # Not used with sqlite3.
       
    20         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
       
    21         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
       
    22     }
       
    23 }
       
    24 
       
    25 # Local time zone for this installation. Choices can be found here:
       
    26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
       
    27 # although not all choices may be available on all operating systems.
       
    28 # If running in a Windows environment this must be set to the same as your
       
    29 # system time zone.
       
    30 TIME_ZONE = 'Europe/Paris'
       
    31 
       
    32 # Language code for this installation. All choices can be found here:
       
    33 # http://www.i18nguy.com/unicode/language-identifiers.html
       
    34 LANGUAGE_CODE = 'fr-fr'
       
    35 
       
    36 ugettext = lambda s: s
       
    37 
       
    38 LANGUAGES = ( 
       
    39     ('fr', ugettext('French')),
       
    40 )
       
    41 
       
    42 
       
    43 SITE_ID = 1
       
    44 
       
    45 # If you set this to False, Django will make some optimizations so as not
       
    46 # to load the internationalization machinery.
       
    47 USE_I18N = True
       
    48 
       
    49 # Absolute path to the directory that holds media.
       
    50 # Example: "/home/media/media.lawrence.com/"
       
    51 MEDIA_ROOT = ''
       
    52 
       
    53 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
       
    54 # trailing slash if there is a path component (optional in other cases).
       
    55 # Examples: "http://media.lawrence.com", "http://example.com/media/"
       
    56 MEDIA_URL = ''
       
    57 
       
    58 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
       
    59 # trailing slash.
       
    60 # Examples: "http://foo.com/media/", "/media/".
       
    61 ADMIN_MEDIA_PREFIX = '/media/'
       
    62 
       
    63 LDT_MEDIA_PREFIX = '/ldt/'
       
    64 
       
    65 # Make this unique, and don't share it with anybody.
       
    66 SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma'
       
    67 
       
    68 # List of callables that know how to import templates from various sources.
       
    69 TEMPLATE_LOADERS = (
       
    70     'django.template.loaders.filesystem.Loader',
       
    71     'django.template.loaders.app_directories.Loader',
       
    72 #     'django.template.loaders.eggs.Loader',
       
    73 )
       
    74 
       
    75 MIDDLEWARE_CLASSES = (
       
    76     'django.middleware.common.CommonMiddleware',
       
    77     'django.contrib.sessions.middleware.SessionMiddleware',
       
    78     'django.middleware.csrf.CsrfViewMiddleware',
       
    79     'django.contrib.auth.middleware.AuthenticationMiddleware',
       
    80     'django.middleware.locale.LocaleMiddleware',
       
    81     'django.contrib.messages.middleware.MessageMiddleware',
       
    82     'jogging.middleware.LoggingMiddleware',
       
    83 )
       
    84 
       
    85 TEMPLATE_CONTEXT_PROCESSORS = ( 
       
    86     "django.core.context_processors.request",
       
    87     "django.core.context_processors.auth",
       
    88     "django.core.context_processors.debug",
       
    89     "django.core.context_processors.i18n",
       
    90     "django.core.context_processors.media",
       
    91     "ldt.utils.context_processors.ldt",
       
    92     "ldt.utils.context_processors.base",
       
    93     "ldt.utils.context_processors.web",
       
    94     "ldtplatform.utils.context_processors.version",
       
    95 )
       
    96 
       
    97 
       
    98 ROOT_URLCONF = 'platform.urls'
       
    99 
       
   100 TEMPLATE_DIRS = (
       
   101     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
       
   102     # Always use forward slashes, even on Windows.
       
   103     # Don't forget to use absolute paths, not relative paths.
       
   104     os.path.join(os.path.basename(__file__), 'templates'),
       
   105 )
       
   106 
       
   107 INSTALLED_APPS = (
       
   108     'jogging',
       
   109     'django_extensions',
       
   110     'django.contrib.auth',
       
   111     'django.contrib.contenttypes',
       
   112     'django.contrib.sessions',
       
   113     'django.contrib.sites',
       
   114     'django.contrib.messages',
       
   115     'django.contrib.admin',
       
   116     'ldtplatform',
       
   117     'registration',
       
   118     'tagging',
       
   119     'ldt',
       
   120     'ldt.core',
       
   121     'ldt.ldt_utils',
       
   122     'ldt.user',
       
   123     'ldt.management',
       
   124 )
       
   125 
       
   126 DECOUPAGE_BLACKLIST = (
       
   127      "de_PPP",
       
   128 )
       
   129  
       
   130 ZIP_BLACKLIST = (
       
   131      "__MACOSX",
       
   132 )
       
   133 
       
   134 ACCOUNT_ACTIVATION_DAYS = 7 
       
   135 
       
   136 LDT_MAX_SEARCH_NUMBER = 50
       
   137 LDT_JSON_DEFAULT_INDENT = 2
       
   138 
       
   139 
       
   140 from config import *
       
   141 
       
   142 LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/'
       
   143 LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/logout/'
       
   144 LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform'
       
   145 
       
   146 GLOBAL_LOG_LEVEL = LOG_LEVEL
       
   147 GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}]
       
   148