def restore_object(self, attrs, instance=None):
    if not instance:
        instance = super(RegisterationSerializer, self).restore_object(attrs,
            instance)
instance.set_password(attrs.get('password'))
return instance
How to create a django User using DRF's ModelSerializer