开发者

django - any prebuilt authentication signal receivers?

I'm writing a custom logout view since the Django built in logout function wipes out all the sessions when it calls the request.session.flush(). I have some sessions variables that I would like t开发者_StackOverflowo keep even though the user has logged out.

I was thinking to use a signal to notify all the web site that I've logged out. Does the Django 1.2.4 authentication system have any built signal receivers to send a signal to so the other pages on the web site will be "informed" that I've logged out?


No, Django 1.2.4 doesn't provide authentication signals, but they were added in trunk, so the next release probably will include them.

http://docs.djangoproject.com/en/dev//topics/auth/#login-and-logout-signals

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜