def __format_items(items, column_names):
 dataset = []
 for item_dict in items:
  row = []
  for fieldname in column_names:
   if (fieldname == 'name'):
    html_element = 'name'
   elif (fieldname in ['system', 'repo', 'distro', 'profile', 'image', 'mgmtclass', 'package', 'file']):
    html_element = 'editlink'
   elif (fieldname in field_ui_info.USES_CHECKBOX):
    html_element = 'checkbox'
   else:
    html_element = 'text'
   row.append([fieldname, item_dict[fieldname], html_element])
  dataset.append(row)
 return dataset

def __format_items ( items , column_names ) : dataset = [ ] for item_dict in items : row = [ ] for fieldname in column_names : if ( fieldname == 'name' ) : html_element = 'name' elif ( fieldname in [ 'system' , 'repo' , 'distro' , 'profile' , 'image' , 'mgmtclass' , 'package' , 'file' ] ) : html_element = 'editlink' elif ( fieldname in field_ui_info . USES_CHECKBOX ) : html_element = 'checkbox' else : html_element = 'text' row . append ( [ fieldname , item_dict [ fieldname ] , html_element ] ) dataset . append ( row ) return dataset
format items retrieved from xmlrpc for rendering by the generic_edit template .