def __init__(self, **kwargs):
        """Initialize instance."""
        super(ExampleSearch, self).__init__(**kwargs)
        if not current_user.is_authenticated:
            self.query = self.query._proxied & Q(
                Bool(filter=[Q('term', public=1)])
            )
def __init__ ( self , ** kwargs ) : super ( ExampleSearch , self ) . __init__ ( ** kwargs ) if not current_user . is_authenticated : self . query = self . query . _proxied & Q ( Bool ( filter = [ Q ( 'term' , public = 1 ) ] ) )
Initialize instance.