开发者

Is this a bug in Django or what? Logging out of the Django Authentication system...will remove all sessiosn?

开发者 https://www.devze.com 2022-12-18 23:49 出处:网络
I\'m using sessions across my application. And using logins. When I do a simple: #log out the user. logout(request)

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

When I do a simple:

#log out the user.
logout(request)

...t开发者_运维问答he request.sessions get erased.

What is this??!


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


I believe the correct syntax is:

logout(request.user)
0

精彩评论

暂无评论...
验证码 换一张
取 消