#NEWLINE# def render( self , name , value , attrs = None ) : #NEWLINE# #INDENT# if ( ( value is not None ) and ( not isinstance ( value , ( list , tuple ) ) ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'Value supplied for %s must be a list or tuple.' % name ) ) #NEWLINE# #UNINDENT# output = [ ] #NEWLINE# value = ( [ ] if ( value is None ) else value ) #NEWLINE# final_attrs = self . build_attrs ( attrs ) #NEWLINE# id_ = final_attrs . get ( 'id' , None ) #NEWLINE# value . append ( '' ) #NEWLINE# for ( i , widget_value ) in enumerate ( value ) : #NEWLINE# #INDENT# if id_ : #NEWLINE# #INDENT# final_attrs = dict ( final_attrs , id = ( '%s_%s' % ( id_ , i ) ) ) #NEWLINE# #UNINDENT# output . append ( self . data_widget . render ( ( name + ( '_%s' % widget_value ) ) , widget_value , final_attrs ) ) #NEWLINE# #UNINDENT# return mark_safe ( self . format_output ( output ) )