更新时间:2023-02-25 12:33:29
Your user will never authenticate, because you're saving the password in plain text - and authenticate
expects a hashed password. You should call user.set_password(password)
on the newly-created user object before saving it to the db - see the built-in UserCreationForm
.