#NEWLINE# def set_field_labels( fields , prefix = '' ) : #NEWLINE# #INDENT# for field in fields : #NEWLINE# #INDENT# if isinstance ( field , ConfigFieldParent ) : #NEWLINE# #INDENT# new_prefix = ( '%s%s.' % ( new_prefix , field . name ) ) #NEWLINE# set_field_labels ( field . sub_fields , prefix = new_prefix ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# full_field_name = ( '%s%s' % ( prefix , field . name ) ) #NEWLINE# label = find_simpledoc ( full_field_name ) #NEWLINE# if ( ( label is not None ) and ( 'label' not in field . widget_options ) ) : #NEWLINE# #INDENT# field . widget_options [ 'label' ] = label