def get_request_ip(request):
 return (request.META.get('HTTP_X_FORWARDED_FOR') or request.META.get('REMOTE_ADDR') or request.META.get('HTTP_X_REAL_IP'))

def get_request_ip ( request ) : return ( request . META . get ( 'HTTP_X_FORWARDED_FOR' ) or request . META . get ( 'REMOTE_ADDR' ) or request . META . get ( 'HTTP_X_REAL_IP' ) )
return the ip address from a http request object .