Django 管理员密码自发更改
奇怪的事情发生了。我正在本地开发,并且我的管理员超级用户帐户工作了很长一段时间。
我最近只是搞乱了 Django 中的装饰器模块,但我最终没有在那里添加任何代码(我确实添加了一些,但后来我删除了所有代码)。
现在,我的管理员不再识别我的密码。我 100% 确定密码是正确的。
我在开发服务器中收到一条回溯,声称这是一个套接字错误。
C:\Python27\lib\socket.py, line 303
error: an established connection was aborted by the software in your host machine
知道这是怎么回事吗?
Something bizarre happened. I'm developing locally and I had my admin superuser account working for quite a while.
I recently just messed around with the decorators module in Django, but I ultimately didn't add any code there (i did add some, but I then deleted all of it).
Now, my admin is no longer recognizing my password. I am 100% certain that the password is correct.
I am receiving a traceback within my development server which claims that it's a Sockets error.
C:\Python27\lib\socket.py, line 303
error: an established connection was aborted by the software in your host machine
Any clue what is going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从你所说的情况来看,不知道为什么会发生这种情况。但是如果您需要重置管理员密码,您可以这样做:
从 shell:
在 python 中:
No idea why that might have happened, from what you've said. But if you need to reset your admin password, you can do it like this:
From shell:
In python:
如果您使用的是较新版本的 django,如果您尝试从 manage.py 更改管理员密码,会发生什么情况?
http://docs.djangoproject。 com/en/dev/ref/django-admin/?from=olddocs#django-admin-changepassword
If you are using a newer version of django, what happens if you try to change your admin password from manage.py?
http://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocs#django-admin-changepassword