from ipware import get_client_ip


class ClientIPMixin:

    def get_client_ip(self, request):
        client_ip, is_routable = get_client_ip(request)
        if client_ip is None:
            return None
        else:
            if is_routable:
                return client_ip

        # Return None when is not routable
        return client_ip

59dca33fd390e0ee384b81bee8b66aeafcc065b3
<mask token>

<mask token>


class ClientIPMixin:
    <mask token>

<mask token>


class ClientIPMixin:

    def get_client_ip(self, request):
        client_ip, is_routable = get_client_ip(request)
        if client_ip is None:
            return None
        elif is_routable:
            return client_ip
        return client_ip

from ipware import get_client_ip


class ClientIPMixin:

    def get_client_ip(self, request):
        client_ip, is_routable = get_client_ip(request)
        if client_ip is None:
            return None
        elif is_routable:
            return client_ip
        return client_ip

from ipware import get_client_ip


class ClientIPMixin:

    def get_client_ip(self, request):
        client_ip, is_routable = get_client_ip(request)
        if client_ip is None:
            return None
        else:
            if is_routable:
                return client_ip

        # Return None when is not routable
        return client_ip
