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