Commit ad3c5d36 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by Admin Y Strator

Nouveau dictionnaire templates + HOSTNAME db

parent 2d797128
......@@ -53,8 +53,6 @@ SESSION_COOKIE_AGE = 900
SESSION_SAVE_EVERY_REQUEST = True
TEMPLATE_DEBUG = DEBUG
EMAIL_SUBJECT_PREFIX = "[Intranet2 Cr@ns] "
# Nécessaire pour timezone.now() renvoie un datetime timezoné
......@@ -86,7 +84,7 @@ if DB_HOST:
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django',
#'HOST': DB_HOST,
'HOST': DB_HOST,
'USER': 'crans',
},
}
......@@ -156,7 +154,7 @@ MIDDLEWARE_CLASSES = (
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
TPL_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
......@@ -165,11 +163,11 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"django.template.context_processors.request",
)
TEMPLATE_CONTEXT_PROCESSORS += (
TPL_CONTEXT_PROCESSORS += (
'intranet.custom_context_processor.app_list',
)
if os.getenv('DBG_LDAP'):
TEMPLATE_CONTEXT_PROCESSORS += (
TPL_CONTEXT_PROCESSORS += (
'intranet.custom_context_processor.password_hint',
)
......@@ -180,16 +178,13 @@ TEMPLATES = [
'DIRS': [os.path.join(BASE_DIR,'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': TEMPLATE_CONTEXT_PROCESSORS
},
'context_processors': TPL_CONTEXT_PROCESSORS,
'debug' : DEBUG,
},
},]
ROOT_URLCONF = 'intranet.urls'
# Dossiers où trouver des templates, hardcodé (chaque apps qui a un
# dossier templates se rajoute en plus automatiquement)
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
LOGIN_URL = "/login"
LOGIN_REDIRECT_URL = "/"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment