Esempio n. 1
0
 def create(self,title,alias,content):
     id = Ticket().get_ticket()
     acticle = ArticleModel()
     acticle.set_article( {'id':id,'title':title,'alias':alias,'content':content})
     return acticle.save()
Esempio n. 2
0
 def get_article_by_id(self, id):
     article = ArticleModel()
     if article.set_id(id).get():
         return article
     else:
         return None