[Fixed]-Remove password from custom Django User model

23👍

An alternative to removing the password field would be to use set_unusable_password, which marks the user as having no password set.

def create_user(phone, name=None):
    user = User(name=name, phone=phone)
    user.set_unusable_password()
    user.save()
    return user

8👍

Just override the password attribute:

password = None
👤sean

Leave a comment