def is_cms_request(self, request):
        toolbar_hide = get_cms_setting('TOOLBAR_HIDE')
        internal_ips = get_cms_setting('INTERNAL_IPS')

        if internal_ips:
            client_ip = get_request_ip(request)
            if internal_ips not in client_ip:
                return False

        if not toolbar_hide:
            return True

        try:
            match = resolve(request.path_info)
        except:
            return False

        return match.url_name in ('pages-root', 'pages-details-by-slug')
dataset/ETHPy150Open divio/django-cms/cms/middleware/toolbar.py/ToolbarMiddleware.is_cms_request/swapped operands of `not in`