Esempio n. 1
0
 def modify_by_uid(pid, post_data):
     rec = MReply.get_by_uid(pid)
     if rec:
         entry = TabReply.update(
             user_name=post_data['user_name'],
             user_id=post_data['user_id'],
             category=post_data['category'],
             timestamp=tools.timestamp(),
             date=datetime.datetime.now(),
             cnt_md=tornado.escape.xhtml_escape(post_data['cnt_reply']),
             cnt_html=tools.markdown2html(post_data['cnt_reply']),
         ).where(TabReply.uid == pid)
         entry.execute()
         return pid
Esempio n. 2
0
 def update_vote(reply_id, count):
     entry = TabReply.update(vote=count).where(TabReply.uid == reply_id)
     entry.execute()