示例#1
0
    def update(self, uid, post_data):

        cnt_html = tools.markdown2html(post_data['cnt_md'][0])

        entry = CabWiki.update(
            title=post_data['title'][0],
            date=datetime.datetime.now(),
            cnt_html=cnt_html,
            user_name=post_data['user_name'],
            cnt_md=tornado.escape.xhtml_escape(post_data['cnt_md'][0]),
            time_update=tools.timestamp(),
        ).where(CabWiki.uid == uid)
        entry.execute()
示例#2
0
    def update(self, uid, post_data):


        cnt_html = tools.markdown2html(post_data['cnt_md'][0])

        entry = CabWiki.update(
            title=post_data['title'][0],
            date=datetime.datetime.now(),
            cnt_html=cnt_html,
            user_name=post_data['user_name'],
            cnt_md=tornado.escape.xhtml_escape(post_data['cnt_md'][0]),
            time_update=tools.timestamp(),
        ).where(CabWiki.uid == uid)
        entry.execute()
示例#3
0
文件: mwiki.py 项目: daimon99/TorCMS
    def update(self, uid, post_data):

        print(post_data["src_type"][0])
        if post_data["src_type"][0] == "1":
            cnt_html = tools.rst2html(post_data["cnt_md"][0])
        else:
            cnt_html = tools.markdown2html(post_data["cnt_md"][0])

        entry = CabWiki.update(
            title=post_data["title"][0],
            date=datetime.datetime.now(),
            cnt_html=cnt_html,
            user_name=post_data["user_name"],
            cnt_md=tornado.escape.xhtml_escape(post_data["cnt_md"][0]),
            time_update=tools.timestamp(),
            src_type=post_data["src_type"][0],
        ).where(CabWiki.uid == uid)
        entry.execute()
示例#4
0
    def update(self, uid, post_data):

        print(post_data['src_type'][0])
        if post_data['src_type'][0] == '1':
            cnt_html = tools.rst2html(post_data['cnt_md'][0])
        else:
            cnt_html = tools.markdown2html(post_data['cnt_md'][0])

        entry = CabWiki.update(
            title=post_data['title'][0],
            date=datetime.datetime.now(),
            cnt_html=cnt_html,
            user_name=post_data['user_name'],
            cnt_md=tornado.escape.xhtml_escape(post_data['cnt_md'][0]),
            time_update=time.time(),
            # id_spec=id_spec,
            # logo=post_data['logo'][0],
            src_type=post_data['src_type'][0]).where(CabWiki.uid == uid)
        entry.execute()
示例#5
0
文件: mwiki.py 项目: Ryan007/TorCMS
    def update(self, uid, post_data):


        print(post_data['src_type'][0])
        if post_data['src_type'][0] == '1':
            cnt_html = tools.rst2html(post_data['cnt_md'][0])
        else:
            cnt_html = tools.markdown2html(post_data['cnt_md'][0])

        entry = CabWiki.update(
            title=post_data['title'][0],
            date=datetime.datetime.now(),
            cnt_html=cnt_html,
            user_name=post_data['user_name'],
            cnt_md=tornado.escape.xhtml_escape(post_data['cnt_md'][0]),
            time_update=time.time(),
            src_type=post_data['src_type'][0]
        ).where(CabWiki.uid == uid)
        entry.execute()
示例#6
0
文件: mwiki.py 项目: daimon99/TorCMS
 def update_view_count_by_uid(self, uid):
     entry = CabWiki.update(view_count=CabWiki.view_count + 1).where(CabWiki.uid == uid)
     entry.execute()
示例#7
0
文件: mwiki.py 项目: daimon99/TorCMS
 def update_view_count(self, citiao):
     entry = CabWiki.update(view_count=CabWiki.view_count + 1).where(CabWiki.title == citiao)
     entry.execute()
示例#8
0
 def update_view_count_by_uid(self, uid):
     entry = CabWiki.update(view_count=CabWiki.view_count +
                            1).where(CabWiki.uid == uid)
     entry.execute()
示例#9
0
 def update_view_count(self, citiao):
     entry = CabWiki.update(view_count=CabWiki.view_count +
                            1).where(CabWiki.title == citiao)
     entry.execute()