[英]DatabaseError: current transaction is aborted, commands ignored until end of transaction block - in incognite mode but no error in normal
i am getting this error in the incognite mode of chrome : DatabaseError: current transaction is aborted, commands ignored until end of transaction block 我在chrome的隐身模式下遇到此错误:DatabaseError:当前事务已中止,命令被忽略,直到事务块结束
But, in the normal mode, i am not getting this error . 但是,在正常模式下,我没有收到此错误。
I am getting this error at request.session.save from some middleware . 我在来自一些中间件的request.session.save中遇到此错误。
Upgraded to 1.4.2 from 1.3 recently. 最近从1.3升级到1.4.2。
Regarding session backends, I set it as database backend. 关于会话后端,我将其设置为数据库后端。 When I changed to cache backend, it is not giving error . 当我更改为缓存后端时,它没有给出error。
You see in incognito mode, chrome automatically delete cookie files, while django session mechanism store session id and csrf token in cookie. 您可以在隐身模式下看到chrome自动删除cookie文件,而django会话机制则将会话id和csrf令牌存储在cookie中。
You can't use standart django session mechanism with deleting cookie. 您不能在删除cookie时使用标准的django会话机制。 But there is some methods to implement session without cookie. 但是有一些方法可以实现不使用cookie的会话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.