#NEWLINE# def init_search( self ) : #NEWLINE# #INDENT# if self . column_searchable_list : #NEWLINE# #INDENT# for p in self . column_searchable_list : #NEWLINE# #INDENT# if isinstance ( p , string_types ) : #NEWLINE# #INDENT# p = getattr ( self . model , p ) #NEWLINE# #UNINDENT# field_type = type ( p ) #NEWLINE# if ( ( field_type != CharField ) and ( field_type != TextField ) ) : #NEWLINE# #INDENT# raise Exception ( ( 'Can only search on text columns. ' + ( 'Failed to setup search for "%s"' % p ) ) ) #NEWLINE# #UNINDENT# self . _search_fields . append ( self ) #NEWLINE# #UNINDENT# #UNINDENT# return bool ( self . _search_fields )