1👍
The create_user
function is just a shortcut. You should instantiate a user with user = MyUser(field1=arg1, field2=arg2)
, remember to use the set_password
function for the password, and call user.save()
.
There is a generic create
method as well that accepts all fields available on your user model, but I don’t know if it handles passwords correctly.
👤knbk
Source:stackexchange.com