summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-06-01 22:25:06 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-06-01 22:25:06 +0000
commit26b61aa8131c2bce21be22aa4d00720d6c1326ad (patch)
tree555f33c47c4e8ae46bd2ef16a735e73ecfe8b456 /docs
parentdbcd2fe985498889e1206f54c196f00879e79dae (diff)
Fixed #395 -- Added SESSION_EXPIRE_AT_BROWSER_CLOSE setting, which regulates whether session framework should use browser-session-length cookies.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3049 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/sessions.txt24
-rw-r--r--docs/settings.txt8
2 files changed, 32 insertions, 0 deletions
diff --git a/docs/sessions.txt b/docs/sessions.txt
index b7f16b67b9..2dba491159 100644
--- a/docs/sessions.txt
+++ b/docs/sessions.txt
@@ -197,6 +197,22 @@ will be sent on every request.
Similarly, the ``expires`` part of a session cookie is updated each time the
session cookie is sent.
+Browser-length sessions vs. persistent 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.
+
Settings
========
@@ -225,6 +241,14 @@ Default: ``'sessionid'``
The name of the cookie to use for sessions. This can be whatever you want.
+SESSION_EXPIRE_AT_BROWSER_CLOSE
+-------------------------------
+
+Default: ``False``
+
+Whether to expire the session when the user closes his or her browser. See
+"Browser-length sessions vs. persistent sessions" above.
+
SESSION_SAVE_EVERY_REQUEST
--------------------------
diff --git a/docs/settings.txt b/docs/settings.txt
index 80000fad5b..26d5930f21 100644
--- a/docs/settings.txt
+++ b/docs/settings.txt
@@ -603,6 +603,14 @@ Default: ``'sessionid'``
The name of the cookie to use for sessions. This can be whatever you want.
See the `session docs`_.
+SESSION_EXPIRE_AT_BROWSER_CLOSE
+-------------------------------
+
+Default: ``False``
+
+Whether to expire the session when the user closes his or her browser.
+See the `session docs`_.
+
SESSION_SAVE_EVERY_REQUEST
--------------------------