Пример #1
0
 def post(self):
     self.check_xsrf_cookie()
     with NoteSaver(rqh=self) as saver:
         saver.get_title()
         saver.get_text()
         saver.get_url()
         saver.get_file()
         saver.get_tags()
     self.see_other('note', saver.doc['_id'])
Пример #2
0
 def post(self, iuid):
     self.check_xsrf_cookie()
     note = self.get_note(iuid)
     if note is None:
         raise tornato.web.HTTPError(404)
     self.check_owner_or_admin(note)
     with NoteSaver(doc=note, rqh=self) as saver:
         saver.get_title()
         saver.get_text()
         saver.get_url()
         saver.get_file()
         saver.get_tags()
     self.see_other('note', note['_id'])