def _get_request_ip(request, default=''):
 if ((request is not None) and hasattr(request, 'META')):
  return get_ip(request)
 else:
  return default

def _get_request_ip ( request , default = '' ) : if ( ( request is not None ) and hasattr ( request , 'META' ) ) : return get_ip ( request ) else : return default
helper method to get ip from a requests meta dict .