Esempio n. 1
0
 def get_by_wiki(self, citiao):
     tt = CabWiki.select().where(CabWiki.title == citiao).count()
     if tt == 0:
         return None
     else:
         self.update_view_count(citiao)
         return CabWiki.get(CabWiki.title == citiao)
Esempio n. 2
0
 def get_by_wiki(self, citiao):
     tt = CabWiki.select().where(CabWiki.title == citiao).count()
     if tt == 0:
         return None
     else:
         self.update_view_count(citiao)
         return CabWiki.get(CabWiki.title == citiao)
Esempio n. 3
0
 def get_by_title(self, in_title):
     try:
         return CabWiki.get(CabWiki.title == in_title)
     except:
         return None
Esempio n. 4
0
 def get_by_id(self, in_uid):
     tt = CabWiki.select().where(CabWiki.uid == in_uid).count()
     if tt == 0:
         return None
     else:
         return CabWiki.get(CabWiki.uid == in_uid)
Esempio n. 5
0
 def get_by_title(self, in_title):
     try:
         return CabWiki.get(CabWiki.title == in_title)
     except:
         return None
Esempio n. 6
0
 def get_by_id(self, in_uid):
     tt = CabWiki.select().where(CabWiki.uid == in_uid).count()
     if tt == 0:
         return None
     else:
         return CabWiki.get(CabWiki.uid == in_uid)