#NEWLINE# def __init__( self , transform , verbose_name = None , sortable = True , link = None , allowed_data_types = [ ] , hidden = False , attrs = None , status = False , status_choices = None , display_choices = None , empty_value = None , filters = None , classes = None , summation = None , auto = None , truncate = None , link_classes = None , wrap_list = False , form_field = None , form_field_attributes = None , update_action = None , link_attrs = None , cell_attributes_getter = None , help_text = None ) : #NEWLINE# #INDENT# self . classes = list ( ( classes or getattr ( self , 'classes' , [ ] ) ) ) #NEWLINE# super ( Column , self ) . __init__ ( ) #NEWLINE# self . attrs . update ( ( attrs or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# if callable ( transform ) : #NEWLINE# #INDENT# self . transform = transform #NEWLINE# self . name = ( '<%s callable>' % transform . __name__ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . transform = unicode ( transform ) #NEWLINE# self . name = self . transform #NEWLINE# #UNINDENT# if ( verbose_name is None ) : #NEWLINE# #INDENT# if callable ( transform ) : #NEWLINE# #INDENT# self . verbose_name = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . verbose_name = self . transform . title ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . verbose_name = verbose_name #NEWLINE# #UNINDENT# self . auto = auto #NEWLINE# self . sortable = sortable #NEWLINE# self . link = link #NEWLINE# self . allowed_data_types = allowed_data_types #NEWLINE# self . hidden = hidden #NEWLINE# self . status = status #NEWLINE# self . empty_value = ( empty_value or _ ( '-' ) ) #NEWLINE# self . filters = ( filters or [ ] ) #NEWLINE# self . truncate = truncate #NEWLINE# self . wrap_list = wrap_list #NEWLINE# self . form_field = form_field #NEWLINE# self . form_field_attributes = ( form_field_attributes or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . update_action = update_action #NEWLINE# self . link_attrs = ( link_attrs or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . help_text = help_text #NEWLINE# if link_classes : #NEWLINE# #INDENT# self . link_attrs [ 'class' ] = ' ' . join ( link_classes ) #NEWLINE# #UNINDENT# self . cell_attributes_getter = cell_attributes_getter #NEWLINE# if status_choices : #NEWLINE# #INDENT# self . status_choices = status_choices #NEWLINE# #UNINDENT# self . display_choices = display_choices #NEWLINE# if ( ( summation is not None ) and ( summation not in self . summation_methods ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Summation method %s must be one of %s.' % ( summation , ', ' . join ( self . summation_methods . keys ( ) ) ) ) ) #NEWLINE# #UNINDENT# self . summation = summation #NEWLINE# self . creation_counter = Column . creation_counter #NEWLINE# Column . creation_counter += 1 #NEWLINE# if ( self . sortable and ( not self . auto ) ) : #NEWLINE# #INDENT# self . classes . append ( 'sortable' ) #NEWLINE# #UNINDENT# if self . hidden : #NEWLINE# #INDENT# self . classes . append ( 'hide' ) #NEWLINE# #UNINDENT# if ( self . link is not None ) : #NEWLINE# #INDENT# self . classes . append ( 'anchor' )