user_management/api/views.py
def post(self, request, *args, **kwargs):
        """Validate `email` and send a request to confirm it."""
        serializer = self.serializer_class(data=request.data)

        if not serializer.is_valid():
            return response.Response(
                serializer.errors,
                status=status.HTTP_400_BAD_REQUEST,
            )

        serializer.user.send_validation_email()
        msg = _('Email confirmation sent.')
        return response.Response(msg, status=status.HTTP_204_NO_CONTENT)
def post(self, request, *args, **kwargs):
        serializer = self.serializer_class(data=request.data)

        if not serializer.is_valid():
            return response.Response(
                serializer.errors,
                status=status.HTTP_400_BAD_REQUEST,
            )

        serializer.user.send_validation_email()
        msg = _('Email confirmation sent.')
        return response.Response(msg, status=status.HTTP_204_NO_CONTENT)
def post ( self , request , * args , * * kwargs ) : serializer = self . serializer_class ( data = request . data ) if not serializer . is_valid ( ) : return response . Response ( serializer . errors , status = status . HTTP_400_BAD_REQUEST , ) serializer . user . send_validation_email ( ) msg = _ ( 'Email confirmation sent.' ) return response . Response ( msg , status = status . HTTP_204_NO_CONTENT )
Validate `email` and send a request to confirm it.
Validate email and send a request to confirm it .