Code

Changes between Version 2 and Version 3 of CookBookDualSessionMiddleware


Ignore:
Timestamp:
01/22/07 13:26:13 (7 years ago)
Author:
Vadim Macagon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBookDualSessionMiddleware

    v2 v3  
    1 The default [http://www.djangoproject.com/documentation/sessions/ SessionMiddleware] that comes with Django lets you pick if you want all sessions to be browser-length or persistent, if you want to use different types of sessions based on a users preference (e.g. the good old "Remember Me" check-box) you're gonna have to write your own middleware. Fortunately it's pretty easy, this page documents my attempt, I don't like the "DualSession" name much, but it's the best I could come up with. 
     1The default [http://www.djangoproject.com/documentation/sessions/ SessionMiddleware] that comes with Django lets you pick if you want all sessions to be browser-length or persistent, if you want to use different types of sessions based on a users preference (e.g. the good old "Remember Me" check-box) you're gonna have to write your own middleware. Fortunately it's pretty easy, this page documents my attempt, I don't like the "!DualSession" name much, but it's the best I could come up with. 
    22 
    33{{{