Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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