Python google.appengine.ext.ndb 模块,StructuredProperty() 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用google.appengine.ext.ndb.StructuredProperty()

项目:start    作者:argeweb    | 项目源码 | 文件源码
def convert_StructuredProperty(self, model, prop, kwargs):
        """Returns a form field for a ``ndb.StructuredProperty``."""
        return None
项目:raw-data-repository    作者:all-of-us    | 项目源码 | 文件源码
def __init__(self, model_type, ancestor_type=None, keep_history=True):
    self.model_type = model_type
    self.ancestor_type = ancestor_type
    self.model_name = model_type.__name__
    self.keep_history = keep_history

    if self.keep_history:
      history_props = {
          'date': ndb.DateTimeProperty(auto_now_add=True),
          'obj': ndb.StructuredProperty(model_type, repeated=False),
          'client_id': ndb.StringProperty(),
      }
      self.history_model = type(
          self.model_name + 'History', (ndb.Model,), history_props)