def real_ip(request):
 return request.META.get('HTTP_X_REAL_IP')

def real_ip ( request ) : return request . META . get ( 'HTTP_X_REAL_IP' )
returns the ip address contained in the http_x_real_ip headers .