def __init__(self): self.tab = CabLink try: CabLink.create_table() self.tab.create_table() except: pass
def update(self, uid, post_data, update_time=False): if update_time: entry = CabLink.update( name=post_data['name'][0], link=post_data['link'][0], order=post_data['order'][0], ).where(CabLink.uid == uid) else: entry = CabLink.update( name=post_data['name'][0], link=post_data['link'][0], order=post_data['order'][0], ).where(CabLink.uid == uid) entry.execute()
def update(self, uid, post_data, update_time=False): entry = CabLink.update( name=post_data['name'][0], link=post_data['link'][0], order=post_data['order'][0], logo = post_data['logo'][0], ).where(CabLink.uid == uid) entry.execute()