Skip to content Skip to sidebar Skip to footer

Which Attribute Of Searchqueryset Has The Same Function As Prefetch_related?

def get_books_by_query_params(context, query, query_parameters): binding_query = query_parameters['binding_query'] query_parameters['validate']=1 default_query = None if query:

Solution 1:

There is filter_and:

SearchQuerySet.filter_and(self, **kwargs)

Narrows the search by looking for (and including) certain attributes. Join behavior in the query is forced to be AND. Used primarily by the filter method.

Post a Comment for "Which Attribute Of Searchqueryset Has The Same Function As Prefetch_related?"