'Translate model property to datastore value.'

def get_value_for_datastore(self, model_instance):

    blob_info = getattr(model_instance, self.name)
    if (blob_info is None):
        return None
    return blob_info.key()
