def get_user_ip(request):
ip = get_real_ip(request)<EOL>if ip is None:<EOL><INDENT>ip = get_ip(request)<EOL>if ip is None:<EOL><INDENT>ip = '<STR_LIT:127.0.0.1>'<EOL><DEDENT><DEDENT>return ip<EOL>
Return user ip

    :param request: Django request object
    :return: user ip