Python google.appengine.ext.db 模块,Blob() 实例源码

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

项目:oscars2016    作者:0x0ece    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:oscars2016    作者:0x0ece    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:sndlatr    作者:Schibum    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:sndlatr    作者:Schibum    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:GAMADV-XTD    作者:taers232c    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:GAMADV-XTD    作者:taers232c    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:office-interoperability-tools    作者:milossramek    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:office-interoperability-tools    作者:milossramek    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:deb-python-oauth2client    作者:openstack    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:deb-python-oauth2client    作者:openstack    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:REMAP    作者:REMAPApp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:REMAP    作者:REMAPApp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:REMAP    作者:REMAPApp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:REMAP    作者:REMAPApp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:ecodash    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:ecodash    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:ecodash    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:ecodash    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:OneClickDTU    作者:satwikkansal    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:OneClickDTU    作者:satwikkansal    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:aqua-monitor    作者:Deltares    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:aqua-monitor    作者:Deltares    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:SurfaceWaterTool    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:SurfaceWaterTool    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:SurfaceWaterTool    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:SurfaceWaterTool    作者:Servir-Mekong    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:Chromium_DepotTools    作者:p07r0457    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:Chromium_DepotTools    作者:p07r0457    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:alfredToday    作者:jeeftor    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:alfredToday    作者:jeeftor    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:node-gn    作者:Shouqun    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:node-gn    作者:Shouqun    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:Deploy_XXNET_Server    作者:jzp820927    | 项目源码 | 文件源码
def get_value_for_form(self, instance):
    """Extract the property value from the instance for use in a form.

    There is no way to convert a Blob into an initial value for a file
    upload, so we always return None.
    """
    return None
项目:Deploy_XXNET_Server    作者:jzp820927    | 项目源码 | 文件源码
def make_value_from_form(self, value):
    """Convert a form value to a property value.

    This extracts the content from the UploadedFile instance returned
    by the FileField instance.
    """
    if have_uploadedfile and isinstance(value, uploadedfile.UploadedFile):
      if not self.form_value:
        self.form_value = value.read()
      b = db.Blob(self.form_value)
      return b
    return super(BlobProperty, self).make_value_from_form(value)
项目:Deploy_XXNET_Server    作者:jzp820927    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:Deploy_XXNET_Server    作者:jzp820927    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:Webradio_v2    作者:Acer54    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:Webradio_v2    作者:Acer54    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:GAMADV-X    作者:taers232c    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:GAMADV-X    作者:taers232c    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:IoT_Parking    作者:leeshlay    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:IoT_Parking    作者:leeshlay    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.
项目:depot_tools    作者:webrtc-uwp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore.
项目:depot_tools    作者:webrtc-uwp    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore.
项目:share-class    作者:junyiacademy    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.
项目:share-class    作者:junyiacademy    | 项目源码 | 文件源码
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore.