#NEWLINE# def determine_metadata( self , request , view ) : #NEWLINE# #INDENT# config_variables = sorted ( config . get_config_variables ( ) . values ( ) , key = attrgetter ( 'weight' ) ) #NEWLINE# config_groups = [ ] #NEWLINE# for config_variable in config_variables : #NEWLINE# #INDENT# if config_variable . is_hidden ( ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( ( not config_groups ) or ( config_groups [ ( - 1 ) ] [ 'name' ] != config_variable . group ) ) : #NEWLINE# #INDENT# config_groups . append ( OrderedDict ( name = config_variable . group , subgroups = [ ] ) ) #NEWLINE# #UNINDENT# if ( ( not config_groups [ ( - 1 ) ] [ 'subgroups' ] ) or ( config_groups [ ( - 1 ) ] [ 'subgroups' ] [ ( - 1 ) ] [ 'name' ] != config_variable . subgroup ) ) : #NEWLINE# #INDENT# config_groups [ ( - 1 ) ] [ 'subgroups' ] . append ( OrderedDict ( name = config_variable . subgroup , items = [ ] ) ) #NEWLINE# #UNINDENT# config_groups [ ( - 1 ) ] [ 'subgroups' ] [ ( - 1 ) ] [ 'items' ] . append ( config_variable . data ) #NEWLINE# #UNINDENT# metadata = super ( ) . determine_metadata ( request , view ) #NEWLINE# metadata [ 'config_groups' ] = config_groups #NEWLINE# return metadata