#NEWLINE# def _build_query( self , model , parent = None , **kwargs ) : #NEWLINE# #INDENT# logging . debug ( ( 'kwargs: %s' % kwargs ) ) #NEWLINE# q = model . query ( ancestor = parent ) #NEWLINE# for ( name , value ) in kwargs . items ( ) : #NEWLINE# #INDENT# name = getattr ( model , name ) #NEWLINE# q = q . filter ( ( name == value ) ) #NEWLINE# #UNINDENT# return q