views:

58

answers:

2

I'm using sessions across my application. And using logins.

When I do a simple:

#log out the user.
logout(request)

...the request.sessions get erased.

What is this??!

+2  A: 

I believe the correct syntax is:

logout(request.user)
puddingfox
If the OP didn't seem so distressed by the deletion of all his sessions, I would find this mildly amusing.
piggles
No, Django documentation says `logout(request)`.
Felix Kling
+4  A: 

If by request.sessions you mean request.session, then it's a documented feature:

http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.logout

Tomasz Zielinski