code: def update(self, uid):
          '''
          Update the wiki.
          '''
          postinfo = MWiki.get_by_uid(uid)
          if self.check_post_role()['EDIT'] or postinfo.user_name == self.get_current_user():
              pass
          else:
              return False
          post_data = self.get_post_data()
          post_data['user_name'] = self.userinfo.user_name
  
          cnt_old = tornado.escape.xhtml_unescape(postinfo.cnt_md).strip()
          cnt_new = post_data['cnt_md'].strip()
  
          if cnt_old == cnt_new:
              pass
          else:
              MWikiHist.create_wiki_history(postinfo)
  
          MWiki.update(uid, post_data)
  
          # cele_gen_whoosh.delay()
          tornado.ioloop.IOLoop.instance().add_callback(self.cele_gen_whoosh)
  
          self.redirect('/wiki/{0}'.format(tornado.escape.url_escape(post_data['title']))f update(self, uid):
          '''
          Update the wiki.
          '''
          postinfo = MWiki.get_by_uid(uid)
          if self.check_post_role()['EDIT'] or postinfo.user_name == self.get_current_user():
              pass
          else:
              return False
          post_data = self.get_post_data()
          post_data['user_name'] = self.userinfo.user_name
  
          cnt_old = tornado.escape.xhtml_unescape(postinfo.cnt_md).strip()
          cnt_new = post_data['cnt_md'].strip()
  
          if cnt_old == cnt_new:
              pass
          else:
              MWikiHist.create_wiki_history(postinfo)
  
          MWiki.update(uid, post_data)
  
          # cele_gen_whoosh.delay()
          tornado.ioloop.IOLoop.instance().add_callback(self.cele_gen_whoosh)
  
          self.redirect('/wiki/{0}'.format(tornado.escape.url_escape(post_data['title'])))
docs: Update the wiki.