def post(self): link_id = self.get_argument("link_id") alert_id = self.get_argument("alertid") user_id = tornado.escape.xhtml_escape(self.current_user) posttype = self.get_argument("posttype") if posttype == "add": logic.add_bookmark(user_id, link_id) else: logic.remove_bookmark(user_id, link_id) self.write("")
def add_bookmark(id): l.add_bookmark(request.user.id, id) return render_template('proposal_snippet.html', proposal=l.get_proposal(id), bookmarked=l.has_bookmark(request.user.id, id))
def add_bookmark(id): l.add_bookmark(request.user.id, id) return redirect(url_for("screening", id=id))