I haven't tried this (I'll try it when I get home), but looking at the session code shows that you should be able to call: request.session.delete() to delete the whole session at once.
On Jul 3, 3:52 am, Daniel Hepper <[EMAIL PROTECTED]> wrote: > Try: > > for key in request.session.keys(): > del request.session[key] > > Regards, > Daniel Hepper > > Am Mittwoch, den 02.07.2008, 20:57 -0700 schrieb Bobby Roberts: > > > > for key in request.session: > > > del request.session[key] > > > I get the following error: > > > Exception Type: KeyError > > Exception Value: 0 > > Exception Location: /usr/lib/python2.5/site-packages/django/contrib/ > > sessions/backends/base.py in __getitem__, line 31 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---