def author_feedback(key): name, id = l.check_author_key(key) if not name: return render_template('bad_feedback_key.html') proposal = l.get_proposal(id) return render_template('author_feedback.html', name=name, proposal=proposal, messages=l.get_discussion(id))
def author_post_feedback(key): name, id = l.check_author_key(key) if not name: return render_template('bad_feedback_key.html') message = request.values.get('message', '').strip() redir = redirect(url_for('author_feedback', key=key)) if not message: flash('Empty message') return redir l.add_to_discussion(None, id, request.values.get('message'), name=name) flash('Your message has been saved!') return redir
def author_post_feedback(key): name, id = l.check_author_key(key) if not name: return render_template("bad_feedback_key.html") message = request.values.get("message", "").strip() redir = redirect(url_for("author_feedback", key=key)) if not message: flash("Empty message") return redir l.add_to_discussion(None, id, request.values.get("message"), name=name) flash("Your message has been saved!") return redir