def delete(self, key): '''Deletes a NonPlayerCharacter. ''' _trace = TRACE+'APINonPlayerCharacters:: delete() ' logging.info(_trace) character = db.get(key) if character is not None and character.class_name() == 'Character': character.delete() r = API200 r[MSG] = 'The world is a better place now that this one is gone.' else: r = API404 r[MSG] = 'NonPlayerCharacter not found for key '+key+' .' return self.response.out.write(simplejson.dumps(r))
def delete(self, key): """Deletes a NonPlayerCharacter. """ _trace = TRACE + "APINonPlayerCharacters:: delete() " logging.info(_trace) character = db.get(key) if character is not None and character.class_name() == "Character": character.delete() r = API200 r[MSG] = "The world is a better place now that this one is gone." else: r = API404 r[MSG] = "NonPlayerCharacter not found for key " + key + " ." return self.response.out.write(simplejson.dumps(r))
def delete(self, key): '''Deletes a PlayerCharacter. ''' _trace = TRACE+'APIPlayerCharacters:: delete() ' logging.info(_trace) character = db.get(key) if character is not None and character.class_name() == 'Character': character.delete() r = API200 r[MSG] = 'The funeral pyre burns bright.' else: r = API404 r[MSG] = 'PlayerCharacter not found for key '+key+' .' return self.response.out.write(simplejson.dumps(r))
def delete(self, key): """Deletes a PlayerCharacter. """ _trace = TRACE + "APIPlayerCharacters:: delete() " logging.info(_trace) character = db.get(key) if character is not None and character.class_name() == "Character": character.delete() r = API200 r[MSG] = "The funeral pyre burns bright." else: r = API404 r[MSG] = "PlayerCharacter not found for key " + key + " ." return self.response.out.write(simplejson.dumps(r))