@classmethod
  def _get_entity_template_data(cls,
                                request_uri,
                                kind,
                                namespace,
                                order,
                                start):

    entities, total_entities = _get_entities(kind,
                                             namespace,
                                             order,
                                             start,
                                             cls.NUM_ENTITIES_PER_PAGE)

    property_name_to_value = _property_name_to_value(entities)

    headers = [{'name': property_name}
               for property_name in sorted(property_name_to_value)]

    template_entities = []
    for entity in entities:
      attributes = []
      for property_name in sorted(property_name_to_value):
        if property_name in entity:
          raw_value = entity[property_name]
          data_type = DataType.get(raw_value)
          value = data_type.format(raw_value)
          short_value = data_type.short_format(raw_value)
        else:
          value = ''
          short_value = ''
        attributes.append({'name': property_name,
                           'value': value,
                           'short_value': short_value,
                          })
      edit_uri = '/datastore/edit/%s?next=%s' % (
          entity.key(), urllib.quote(request_uri))
      template_entities.append(
          {'attributes': attributes,
           'edit_uri': edit_uri,
           'key': entity.key(),
           'key_id': entity.key().id(),
           'key_name': entity.key().name(),
           'shortened_key': str(entity.key())[:8] + '...',
           'write_ops': cls._get_write_ops(entity)})
    return headers, template_entities, total_entities
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/admin/datastore_viewer.py/DatastoreRequestHandler._get_entity_template_data/original