#NEWLINE# def render( self , name , value , attrs = None ) : #NEWLINE# #INDENT# final_attrs = self . build_attrs ( attrs ) #NEWLINE# main_id = self . id_for_label ( final_attrs . get ( 'id' , None ) ) #NEWLINE# if value : #NEWLINE# #INDENT# values = json . loads ( value ) . items ( ) #NEWLINE# empty_row = '' . join ( [ self . make_input_widget ( 'key' , name , '' , main_id , '' , final_attrs ) , self . make_input_widget ( 'value' , name , '' , main_id , '' , final_attrs ) , self . make_del_link ( name , main_id , '' ) ] ) #NEWLINE# output = [ ( self . row_template % ( 'style="display:none;"' , empty_row ) ) ] #NEWLINE# for ( i , ( key , val ) ) in enumerate ( values , start = 1 ) : #NEWLINE# #INDENT# output . extend ( ( self . row_template % ( '' , '' . join ( [ self . make_input_widget ( 'key' , name , key , key , i , final_attrs ) , self . make_input_widget ( 'value' , name , val , main_id , i , final_attrs ) , self . make_del_link ( name , main_id , i ) ] ) ) ) ) #NEWLINE# #UNINDENT# return mark_safe ( self . format_output ( name , main_id , output ) ) #NEWLINE# #UNINDENT# return ''