Module ImportFrom alias alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Str Str ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str Str NameLoad Call AttributeLoad NameLoad attr Str NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr orelse Raise Call NameLoad Call NameLoad Str Return TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore NameStore Dict For NameStore NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr For NameStore NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict TryExcept body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Return AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListComp SubscriptLoad NameLoad Index Str comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A django.core.paginator InvalidPage Paginator django.utils.translation ugettext_lazy _ haystack connections oscar.core.loading get_class N/A facets N/A FacetMunger N/A get_class search.facets FacetMunger SearchHandler N/A object N/A N/A 
    A class that is concerned with performing a search and paginating the
    results. The search is triggered upon initialisation (mainly to have a
    predictable point to process any errors).  Search results are cached, so
    they can be accessed multiple times without incurring any overhead.

    The raison d'etre for this third way to interface with Haystack is
    two-fold. The Haystack search form doesn't do enough for our needs, and
    basing a view off a Haystack search view is unnecessarily invasive.
    Furthermore, using our own search handler means it is easy to swap
    out Haystack, which has been considered before.

    Usage:

        handler = SearchHandler(request.GET, request.get_full_path)
        found_objects = handler.get_paginated_objects()
        context = handler.get_search_context_data()

    Error handling:

        You need to catch an InvalidPage exception which gets thrown when an
        invalid page number is supplied.
     N/A form_class None N/A model_whitelist None N/A paginate_by None N/A paginator_class Paginator N/A page_kwarg page __init__ N/A N/A self request_data full_path N/A N/A N/A N/A self full_path full_path N/A N/A self request_data request_data N/A search_queryset N/A N/A self get_search_queryset N/A N/A self search_form N/A N/A self get_search_form request_data search_queryset N/A N/A self results N/A N/A self get_search_results N/A self search_form N/A N/A N/A self paginator N/A self page N/A N/A self paginate_queryset N/A self results request_data N/A get_search_results N/A N/A self search_form N/A N/A N/A 
        Perform the actual search using Haystack's search form. Returns
        a SearchQuerySet. The SQS is empty if the form is invalid.
         N/A N/A N/A search_form search N/A get_search_form N/A N/A self request_data search_queryset N/A N/A N/A 
        Return a bound version of Haystack's search form.
         N/A kwargs N/A data selected_facets searchqueryset request_data N/A N/A request_data getlist selected_facets search_queryset N/A N/A N/A self form_class kwargs N/A get_search_queryset N/A N/A self N/A N/A N/A 
        Returns the search queryset that is used as a base for the search.
         N/A sqs N/A N/A facets base_sqs N/A N/A self model_whitelist N/A N/A sqs N/A N/A sqs models N/A self model_whitelist N/A sqs N/A paginate_queryset N/A N/A self queryset request_data N/A N/A N/A 
        Paginate the search results. This is a simplified version of
        Django's MultipleObjectMixin.paginate_queryset
         N/A paginator N/A N/A self get_paginator queryset N/A page_kwarg N/A self page_kwarg N/A page N/A N/A request_data get page_kwarg 1 N/A N/A N/A page_number N/A int page N/A N/A N/A ValueError N/A N/A N/A page last N/A N/A page_number N/A paginator num_pages N/A N/A N/A InvalidPage N/A _ Page is not 'last', nor can it be converted to an int. N/A N/A paginator N/A N/A paginator page page_number N/A get_paginator N/A N/A self queryset N/A N/A N/A 
        Return a paginator. Override this to set settings like orphans,
        allow_empty, etc.
         N/A N/A N/A self paginator_class queryset N/A self paginate_by N/A bulk_fetch_results N/A N/A self paginated_results N/A N/A N/A 
        This method gets paginated search results and returns a list of Django
        objects in the same order.

        It preserves the order without doing any ordering in Python, even
        when more than one Django model are returned in the search results. It
        also uses the same queryset that was used to populate the search
        queryset, so any select_related/prefetch_related optimisations are
        in effect.

        It is heavily based on Haystack's SearchQuerySet.post_process_results,
        but works on the paginated results instead of all of them.
         N/A objects N/A N/A models_pks loaded_objects N/A N/A result paginated_results N/A N/A N/A N/A N/A N/A models_pks setdefault N/A result model N/A append N/A result pk N/A search_backend_alias N/A N/A N/A N/A self results query backend connection_alias N/A model models_pks N/A N/A ui N/A N/A N/A connections N/A search_backend_alias get_unified_index N/A index N/A N/A ui get_index model N/A queryset N/A N/A index read_queryset using search_backend_alias N/A N/A loaded_objects N/A model N/A N/A queryset in_bulk N/A models_pks N/A model N/A result paginated_results N/A N/A model_objects N/A N/A loaded_objects get N/A result model N/A N/A N/A N/A N/A result _object N/A model_objects N/A N/A int N/A result pk N/A N/A N/A KeyError N/A N/A N/A N/A N/A N/A objects append N/A result _object N/A objects N/A get_paginated_objects N/A N/A self N/A N/A N/A 
        Return a paginated list of Django model instances. The call is cached.
         N/A N/A hasattr self _objects N/A N/A N/A self _objects N/A N/A paginated_results N/A N/A self page object_list N/A N/A self _objects N/A N/A self bulk_fetch_results paginated_results N/A N/A self _objects N/A get_facet_munger N/A N/A self N/A N/A N/A N/A FacetMunger N/A self full_path N/A N/A self search_form selected_multi_facets N/A N/A N/A self results facet_counts N/A get_search_context_data N/A N/A self context_object_name N/A None N/A N/A 
        Return metadata about the search in a dictionary useful to populate
        template contexts. If you pass in a context_object_name, the dictionary
        will also contain the actual list of found objects.

        The expected usage is to call this function in your view's
        get_context_data:

            search_context = self.search_handler.get_search_context_data(
                self.context_object_name)
            context.update(search_context)
            return context

         N/A munger N/A N/A self get_facet_munger N/A facet_data N/A N/A munger facet_data N/A has_facets N/A any N/A N/A data N/A results N/A data N/A N/A facet_data values N/A context N/A facet_data has_facets selected_facets form paginator page_obj facet_data has_facets N/A N/A N/A self request_data getlist selected_facets N/A self search_form N/A self paginator N/A self page N/A N/A context_object_name None N/A N/A N/A context N/A context_object_name N/A N/A self get_paginated_objects N/A context N/A N/A