def addPost(): if not user.current_user(): abort(403) url = request.form["url"] link.add(user.current_user(), url) if request.form.has_key("redirect"): return redirect(url) return redirect(url_for("index"))
def link_push(): url = request.form['url'] link.add(user.current_user(), url) return jsonify(success=True)