From f628a05e15225f7b98b4a97362dc6fe4ff3d9818 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Sat, 21 Jul 2012 01:17:01 +0200 Subject: [PATCH] =?UTF-8?q?config=20de=20la=20dur=C3=A9e=20des=20sessions?= =?UTF-8?q?=20dans=20local=5Fsettings.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- local_settings.py.example | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/local_settings.py.example b/local_settings.py.example index 6b753b2..5fc9321 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -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 #