Permalink
Browse files

Merge pull request #342 from mansam/master

Added 'delete_attributes' to Model
  • Loading branch information...
2 parents ebf515f + 0a37a87 commit 5dca7f196dff868c0e1b26adff84680f5d028223 @kopertop kopertop committed Sep 18, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 boto/sdb/db/model.py
View
@@ -219,6 +219,19 @@ def put_attributes(self, attrs):
self.reload()
return self
+ def delete_attributes(self, attrs):
+ """Delete just these attributes,
+ not the whole object.
+ :param attrs: Attributes to save, as a list of string names
+ :type attrs: list
+ :return: self
+ :rtype: :class:boto.sdb.db.model.Model
+ """
+ assert(isinstance(attrs, list)), "Argument must be a list of names of keys to delete."
+ self._manager.domain.delete_attributes(self.id, attrs)
+ self.reload()
+ return self
+
save_attributes = put_attributes
def delete(self):

0 comments on commit 5dca7f1

Please sign in to comment.