Django 会话立即过期
我遇到了 Django 和 Django Auth 的问题。有时登录页面将不允许用户登录。当用户按下登录(在 /admin 登录表单或任何自定义登录表单上)时,页面就会刷新。进一步调试后,似乎它正在创建一个会话,然后使其过期(以某种方式)。有人在 Django Auth 中遇到过这种类型的行为吗?
谢谢,
科里
I'm experiencing an issue with Django and Django Auth. From time to time the login page will not allow users to login. When the user presses login (on the /admin login form OR any custom login form) the page simply refreshes. After debugging further it seems that it is creating a session and then expiring it (somehow). Has anyone experienced this type of behavior with Django Auth?
Thanks,
cory
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有遇到这个问题。
但是,您应该在 settings.py 文件中检查您的应用程序、中间件和上下文处理器规范。您需要确保以下各项都已到位(除了您的特定应用程序所需的其他内容之外):
...确保一切顺利,看看您的问题是否仍然存在。祝你好运。
I haven't had this problem.
But so, you should check your apps, middleware, and context processor specifications in your settings.py file. You'll want to be sure the following are in place (in addition to whatever else you need for your specific app):
... make sure that's all good to go and see if your problem persists. Good luck.