from django.contrib.auth.models import User # Save the original method old_set_password = User.set_password def set_password(user, raw_password): if user.id == None: # It's a new user. We must save the django user account first. user.save() # # Do something with the user obejct and the given raw_password ;) # # Use the original method to set the django User password: old_set_password(user, raw_password) # Replace the method User.set_password = set_password