#NEWLINE# def scaffold_filters( self , name ) : #NEWLINE# #INDENT# if isinstance ( name , string_types ) : #NEWLINE# #INDENT# attr = getattr ( self . model , name , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# attr = name #NEWLINE# #UNINDENT# if ( attr is None ) : #NEWLINE# #INDENT# raise Exception ( ( 'Failed to find field for filter: %s' % name ) ) #NEWLINE# #UNINDENT# if ( attr . model_class != self . model ) : #NEWLINE# #INDENT# visible_name = ( '%s / %s' % ( self . get_column_name ( self . model_class . __name__ ) , self . get_column_name ( attr . name ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( name , string_types ) ) : #NEWLINE# #INDENT# visible_name = self . get_column_name ( attr . name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# visible_name = self . get_column_name ( name ) #NEWLINE# #UNINDENT# #UNINDENT# type_name = type ( attr ) . __name__ #NEWLINE# flt = self . filter_converter . convert ( type_name , attr , visible_name ) #NEWLINE# return flt