4👍
✅
I hope you have a password field on your form. To set an inputted password do the following changes,
password = form.cleaned_data.get('password')
user.set_password(password)
Hope this works.
Source:stackexchange.com