def add_bio(self, kw, name): item = Item(self.database, name) item.link_to("k_%s" % kw) item.save()
def create_keyword(self, kw): item = Item(self.database, "k_%s" % kw) item.add_tag('keyword') item.save()
def create_user(self, name): item = Item(self.database, name) item.add_tag('person') item.save()
def create_product(self, id): item = Item(self.database, "product%s" % id) item.add_tag("product") item.save()
def add_purchase(self, customer_id, product_id): item = Item(self.database, "customer%s" % customer_id) item.link_to("product%s" % product_id) item.save()
def create_customer(self, id): item = Item(self.database, "customer%s" % id) item.add_tag("customer") item.save()
def create_user(self,name): item = Item(self.database,name) item.add_tag('person') item.save()
def add_bio(self,kw,name): item = Item(self.database,name) item.link_to("k_%s" % kw) item.save()
def create_keyword(self,kw): item = Item(self.database,"k_%s" % kw) item.add_tag('keyword') item.save()
def like_story(self, user_id, story_id): item = Item(self.database, "user%s" % user_id) item.link_to("story%s" % story_id) item.save()
def create_story(self, id): item = Item(self.database, "story%s" % id) item.add_tag("story") item.save()
def create_user(self, id): item = Item(self.database, "user%s" % id) item.add_tag("user") item.save()
def add_tag(self, story_id, tag_id): item = Item(self.database, "story%s" % story_id) item.link_to("tag%s" % tag_id) item.save()