def get_value_for_datastore(self, model_instance): logging.info("GET VALUE FOR DATASTORE.") value = self.__get__(model_instance, model_instance.__class__) if value is not None: pb_s = CacheController.to_protobuf(value) logging.info("Protobuf: " + str(pb_s)) logging.info("Storing value (following this log)") # _pb = force_encode_utf8(pb_s) return db.Blob(pb_s)
def validate_list_contents(self, value): return [db.Blob(CacheController.to_protobuf(x)) for x in value]