summaryrefslogtreecommitdiff
path: root/docs/sessions.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-08-17 15:05:54 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-08-17 15:05:54 +0000
commitfcec755f01cfaba2a85bfc9511876debbce98631 (patch)
treee990effbcd90e4d405b0f9dcc70cb38e47b6f3dc /docs/sessions.txt
parent0f92ac52cbf81fb2ac01755c558e2e6ad54700e8 (diff)
newforms-admin: Merged from trunk up to [5916]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/sessions.txt')
-rw-r--r--docs/sessions.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/sessions.txt b/docs/sessions.txt
index c7124ba703..96a88c617a 100644
--- a/docs/sessions.txt
+++ b/docs/sessions.txt
@@ -190,6 +190,12 @@ deleted::
# request.session['foo'] instead of request.session.
request.session['foo']['bar'] = 'baz'
+In the last case of the above example, we can tell the session object
+explicitly that it has been modified by setting the ``modified`` attribute on
+the session object::
+
+ request.session.modified = True
+
To change this default behavior, set the ``SESSION_SAVE_EVERY_REQUEST`` setting
to ``True``. If ``SESSION_SAVE_EVERY_REQUEST`` is ``True``, Django will save
the session to the database on every single request.