diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-14 03:57:46 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-14 03:57:46 +0000 |
| commit | 5e8efa9a6032f9c4278199ab354c3ff742387263 (patch) | |
| tree | e5fe4340cdeffd96c1465edc605055956783fc15 /docs | |
| parent | 31ec68c5d939ee63852709163750a0516aaa2619 (diff) | |
Implemented a flush() method on sessions that cleans out the session and
regenerates the key. Used to ensure the caller gets a fresh session at logout,
for example.
Based on a patch from mrts. Refs #7515.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/sessions.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/sessions.txt b/docs/sessions.txt index 39df04ad71..7971601c7a 100644 --- a/docs/sessions.txt +++ b/docs/sessions.txt @@ -110,6 +110,16 @@ A session object has the following standard dictionary methods: It also has these methods: + * ``flush()`` + + **New in Django development version** + + Delete the current session data from the database and regenerate the + session key value that is sent back to the user in the cookie. This is + used if you want to ensure that the previous session data can't be + accessed again from the user's browser (for example, the standard + ``logout()`` method calls it). + * ``set_test_cookie()`` Sets a test cookie to determine whether the user's browser supports |
