#NEWLINE# def filter_folder( self , qs , terms = [ ] ) : #NEWLINE# #INDENT# for term in terms : #NEWLINE# #INDENT# filters = Q ( name__icontains = term ) #NEWLINE# for filter_ in self . get_owner_filter_lookups ( ) : #NEWLINE# #INDENT# filters |= Q ( ** { #NEWLINE# #INDENT# filter_ : qs , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# qs = qs . filter ( filters ) #NEWLINE# #UNINDENT# return qs