From 5e8efa9a6032f9c4278199ab354c3ff742387263 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Thu, 14 Aug 2008 03:57:46 +0000 Subject: 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 --- docs/sessions.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') 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 -- cgit v1.3