我正在自动部署Django。我在安装时使用以下命令创建超级用户:
python manage createsuperuser --username me --email me@example.org --noinput
当我这样做时,没有为帐户设置密码,我无法使用“忘记密码”功能更改密码。
如果我这样做:
python manage changepassword me
然后我可以重置密码。此行为来自此代码:
return (u for u in active_users if u.has_usable_password())
在不破解核心的情况下,为所有用户“激活”重置功能的方法是什么?