会话数据在Django中损坏 [英] Session data corrupted in django

查看:98
本文介绍了会话数据在Django中损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我进入注册页面时,都会收到此错误

Every time when I'm going to my signup page, I'm receiving this error

Session data corrupted

无论如何我尝试注册时,POST请求状态为302,但仍创建了User,但没有将任何电子邮件保存给注册用户.

when I'm trying to signup anyway, POST request status is 302, but User is still created, but didn't save any email to registered user.

为什么会出现该错误以及如何解决?

Why I'm getting that error and how can I fix it?

谢谢!

推荐答案

抱歉,这篇文章迟到了,但是有机会,您是否更改了项目中的SECRET_KEY变量?会话曾经使用这种盐加密,因此,如果您更改它,则会破坏所有会话,但请不要担心!没什么大不了的,最坏的情况是对于之前存在的会话,那些会话需要再次登录,仅此而已;)

Sorry for getting late to this post, but by any chance, did you change the SECRET_KEY variable on your project? sessions used to be cyphered using this salt, so if you changed it you have corrupted all your sessions, but don't worry! is not a big deal, the worst-case scenario is for the sessions that were existing before this, those will need to log-in again, and that's it ;)

这篇关于会话数据在Django中损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆