[Fixed]-Call custom function when Django rest-auth/register succeeds

1๐Ÿ‘

โœ…

I can suggest two options,

  1. Create your own RegisterSerializer, write your custom functionality and set this serializer as your Register serializer by mentioning in settings as follows so that your changes remains when you update the library.

    REST_AUTH_REGISTER_SERIALIZERS = {
        'REGISTER_SERIALIZER': 'path.to.custom.RegisterSerializer',
        ...
    }
    

    Reference

  2. You can create post_save signal for User model and do your custom functionality everytime when a new user object is added.
    Reference

Leave a comment