def get_embargo_response(request, course_id, user):
 redirect_url = redirect_if_blocked(course_id, user=user, ip_address=get_ip(request), url=request.path)
 if redirect_url:
  return Response(status=status.HTTP_403_FORBIDDEN, data={'message': u"Users from this location cannot access the course '{course_id}'.".format(course_id=course_id), 'user_message_url': request.build_absolute_uri(redirect_url)})

def get_embargo_response ( request , course_id , user ) : redirect_url = redirect_if_blocked ( course_id , user = user , ip_address = get_ip ( request ) , url = request . path ) if redirect_url : return Response ( status = status . HTTP_403_FORBIDDEN , data = { 'message' : u"Users from this location cannot access the course '{course_id}'." . format ( course_id = course_id ) , 'user_message_url' : request . build_absolute_uri ( redirect_url ) } )
check whether any country access rules block the user from enrollment .