config de la durée des sessions dans local_settings.py

This commit is contained in:
Thomas NOËL 2012-07-21 01:17:01 +02:00
parent ba72c6c0ad
commit f628a05e15
1 changed files with 16 additions and 0 deletions

View File

@ -43,6 +43,22 @@ LDAP_BIND_PASSWORD = '...' # and its password
LDAP_USER_QUERY = 'supannAliasLogin=%s' # query to retrieve user, %s is the CAS username
LDAP_BASE = 'dc=univ,dc=fr' # base DN for the query
# Session duration
# From : https://docs.djangoproject.com/en/1.4/topics/http/sessions/
# You can control whether the session framework uses browser-length sessions
# vs. persistent sessions with the SESSION_EXPIRE_AT_BROWSER_CLOSE setting.
# By default, SESSION_EXPIRE_AT_BROWSER_CLOSE is set to False, which means
# session cookies will be stored in users' browsers for as long as
# SESSION_COOKIE_AGE. Use this if you don't want people to have to log in every
# time they open a browser.
# If SESSION_EXPIRE_AT_BROWSER_CLOSE is set to True, Django will use
# browser-length cookies -- cookies that expire as soon as the user closes his
# or her browser. Use this if you want people to have to log in every time they
# open a browser.
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_COOKIE_AGE = 24*3600 # 1 day, only if SESSION_EXPIRE_AT_BROWSER_CLOSE = False
#
# Design
#