def render_word(self, word_content=None, error=None, back_to_word=None): note_record = Note.get_note( word_content["word"]) if word_content else None self.render("word.html", word=word_content, error=error, back_to_word=back_to_word, note_record=note_record.format_response())
def post(self, word): note = self.post_schema()['note'] user = self.get_current_user_mongo() note_record = Note.get_note(word) note_record.add_notes(note, user) self.write_response(note_record.format_response()) return
def get(self, note_id): data = {'title': '详情 | 便签', 'note': Note.get_note(note_id)} self.render('admin/admin_note_detail.html', **data)