On Mon, Mar 22, 2010 at 11:17 AM, grimmus <graham.col...@gmail.com> wrote: > Hi, > > I have a simple newsletter signup form. If the user submits the form > and there are no errors then i set the session: > > request.session['signed_up'] = True > > Then, for all other page requests i check if the session exists > > if request.session.get('signed_up', True): > form.thanks = True > > form.thanks shows some HTML in the template. > > How can i remove the session when the user closes the site ? > > I tried SESSION_EXPIRE_AT_BROWSER_CLOSE = True but it does not seem to > do anything. > > Thanks for any advice >
You can't. Session cookies expire when the user closes their browser, not your site, and there is no way to detect when a user 'closes the site', Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.