예제 #1
0
 def set(self, name, value):
     """Save configuration tuple to data store"""
     config_tuple = ConfigTuple.get_by_key_name(name)
     if not config_tuple:
         config_tuple = ConfigTuple(key_name=name)
     config_tuple.value = value
     config_tuple.put()
예제 #2
0
 def set(self, name, value):
     """Save configuration tuple to data store"""
     config_tuple = ConfigTuple.get_by_key_name(name)
     if not config_tuple:
         config_tuple = ConfigTuple(key_name=name)
     config_tuple.value = value
     config_tuple.put()
예제 #3
0
 def get(self, name):
     """Get config tuple from data store; return default if no tuple is found"""
     config_value = ConfigTuple.get_or_insert(name, value=self.defaults[name])
     return config_value.value
예제 #4
0
 def get(self, name):
     """Get config tuple from data store; return default if no tuple is found"""
     config_value = ConfigTuple.get_or_insert(name,
                                              value=self.defaults[name])
     return config_value.value