Django 管理员登录 Cookie 浏览器配置消息

发布于 2024-09-17 05:27:27 字数 620 浏览 2 评论 0原文

我们在登录开发服务器上的 django admin 时遇到了一个特殊问题 - 今天(9 月 1 日)刚刚出现。当我们尝试使用员工用户名和密码登录时,我们会收到以下消息:

您的浏览器似乎未配置为接受 cookie。请启用 cookie,重新加载此页面,然后重试。

我们在本地安装中遇到了同样的问题:

  • 我正在使用 django 1.1.1 升级到 1.1.2 问题,两者都返回相同的问题
  • 另一个开发人员在全新的 1.2.1 安装中遇到了同样的问题

我读了很多关于设置 SESSION_COOKIE_DOMAIN & SESSION_COOKIE_SECURE,我们从未在任何安装上设置过这些,也从未遇到过任何问题。然后我们在本地安装中指定了以下内容,但没有效果。

SESSION_COOKIE_DOMAIN = '127.0.0.1:8000'
SESSION_COOKIE_SECURE = False

这个问题今天才出现,昨天本地安装一切正常,我们所有浏览器都启用了 cookie。

有人有同样经历吗?有什么建议吗?

We have a peculiar problem with logging in to django admin on our dev server - just surfaced today, sept 1st. When we try to log in using staff usernames and passwords we are returned the following message:

Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again.

We encounter the same problem on our local installations:

  • I was using django 1.1.1 upgraded to 1.1.2 problem with both returning same
  • Another developer encountered the same problem on a fresh 1.2.1 installation

I read a lot of chatter about setting SESSION_COOKIE_DOMAIN & SESSION_COOKIE_SECURE, we never had these set on any of our installations and never encountered any problems. We then specified the following in our local installations to no avail.

SESSION_COOKIE_DOMAIN = '127.0.0.1:8000'
SESSION_COOKIE_SECURE = False

This problem just appeared today, yesterday things were fine on local installations, cookies are enabled on all our browsers.

Any one experiencing the same? any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猛虎独行 2024-09-24 05:27:33

事实证明,这是一个使用 chromium 浏览器的简单 cookie 问题——我的个人资料已损坏——这引发了更改 settings.py 和其他内容的恶作剧,这破坏了其他浏览器等。

好吧,现在解决了。

It turns out it was a simple cookie problem using chromium-browser---my profile was corrupt--- which started an escapade of changing settings.py and other things, which broke other browsers etc.

Ah well, solved now.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文