开发者

Django: Store user id in cookie

I'd like to store a unique user identifier开发者_如何学编程 in a cookie (in order to be able to include it in the apache log). I'm thinking of overriding the login method and setting the cookie on success.

Does that sound right? Any reason I should not do this, or is there a better way? Is there a code snippet that already does this?


That linked answer uses the Django session cookie, which is already set automatically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜