def post(self):
form = StatusCommentsForm(self.request.arguments)
if not form.validate():
raise HTTPError(404)
status_id = form.status_id.data
status = yield StatusDocument.find_one({
'_id': ObjectId(status_id)
})
if not status:
raise HTTPError(404)
status_comment_list = yield StatusCommentDocument.get_comment_list(
status_id, self.current_user['_id']
)
html = self.render_string(
'home/template/status/status-comment-list.html',
status=status,
status_comment_list=status_comment_list
)
self.write_json({'html': html})
评论列表
文章目录