src/p4l/settings.py
changeset 39 33a413910b75
parent 24 3b1b0a9309d6
child 43 829d9d4111da
equal deleted inserted replaced
38:c4e5bb735ec1 39:33a413910b75
     1 # Django settings for p4l project.
     1 # Django settings for p4l project.
       
     2 from django.conf import global_settings
     2 
     3 
     3 DEBUG = True
     4 DEBUG = True
     4 TEMPLATE_DEBUG = DEBUG
     5 TEMPLATE_DEBUG = DEBUG
     5 
     6 
     6 ADMINS = (
     7 ADMINS = (
    38 ugettext = lambda s: s
    39 ugettext = lambda s: s
    39 
    40 
    40 LANGUAGES = ( 
    41 LANGUAGES = ( 
    41     ('fr', ugettext('French')),
    42     ('fr', ugettext('French')),
    42     ('en', ugettext('English')),
    43     ('en', ugettext('English')),
       
    44     ('es', ugettext('Spanish')),
    43 )
    45 )
    44 
    46 
    45 
    47 
    46 SITE_ID = 1
    48 SITE_ID = 1
    47 
    49 
    98 )
   100 )
    99 
   101 
   100 MIDDLEWARE_CLASSES = (
   102 MIDDLEWARE_CLASSES = (
   101     'django.middleware.common.CommonMiddleware',
   103     'django.middleware.common.CommonMiddleware',
   102     'django.contrib.sessions.middleware.SessionMiddleware',
   104     'django.contrib.sessions.middleware.SessionMiddleware',
       
   105     'django.middleware.locale.LocaleMiddleware',
   103     'django.middleware.csrf.CsrfViewMiddleware',
   106     'django.middleware.csrf.CsrfViewMiddleware',
   104     'django.contrib.auth.middleware.AuthenticationMiddleware',
   107     'django.contrib.auth.middleware.AuthenticationMiddleware',
   105     'django.contrib.messages.middleware.MessageMiddleware',
   108     'django.contrib.messages.middleware.MessageMiddleware',
   106     'django.middleware.locale.LocaleMiddleware',
       
   107     # Uncomment the next line for simple clickjacking protection:
   109     # Uncomment the next line for simple clickjacking protection:
   108     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
   110     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
   109 )
   111 )
   110 
   112 
   111 ROOT_URLCONF = 'p4l.urls'
   113 ROOT_URLCONF = 'p4l.urls'
   132     'django.contrib.staticfiles',
   134     'django.contrib.staticfiles',
   133     'django.contrib.admin',
   135     'django.contrib.admin',
   134     'south',
   136     'south',
   135     'rest_framework',
   137     'rest_framework',
   136     'p4l'
   138     'p4l'
       
   139 )
       
   140 
       
   141 TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
       
   142     'django.core.context_processors.i18n',
   137 )
   143 )
   138 
   144 
   139 # A sample logging configuration. The only tangible logging
   145 # A sample logging configuration. The only tangible logging
   140 # performed by this configuration is to send an email to
   146 # performed by this configuration is to send an email to
   141 # the site admins on every HTTP 500 error when DEBUG=False.
   147 # the site admins on every HTTP 500 error when DEBUG=False.