示例#1
0
文件: note.py 项目: pekrau/notes
 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
文件: note.py 项目: pekrau/notes
 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'])