def get_IP_address(request):
    """
    Returns the visitor's IP address as a string given the Django ``request``.
    """
    # Catchs the case when the user is on a proxy
    ip = request.META.get('HTTP_X_FORWARDED_FOR', '')
    if ip == '' or ip.lower() in ('unkown', ):
        ip = request.META.get('REMOTE_ADDR', '')   # User is not on a proxy
    if ip == '' or ip.lower() in ('unkown', ):
        ip = request.META.get('HTTP_X_REAL_IP')
    return ip