def add_item(self, item_subtype, item): """add a personal copy of a item to a user's account Arguments: item - Item object being attached to the User Return Value: a ItemCopy instance that links the User to the Item; None if the Item could not be linked """ from src.items.models import ItemCopy itemcopy = ItemCopy(item=item.key, owner=self.key, item_subtype=item_subtype) if itemcopy.put(): self.item_count = self.item_count + 1 self.put() return itemcopy