def reply_to_feedback(id): form = FeedbackForm() feedback_request = get_or_404(LogEntry, id=id) if form.validate_on_submit(): feedback_request.entry.update(replied=True, details=form.feedback.data) flash("Saved feedback") return redirect(url_for('feedback.give_feedback')) return render_template('feedback/give-feedback.html', form=form, feedback_request=feedback_request)
def reply_to_feedback(id): form = FeedbackForm() feedback_request = LogEntry.objects(id=id).get() if form.validate_on_submit(): feedback_request.entry.replied = True feedback_request.entry.details = form.feedback.data feedback_request.entry.save() flash("Saved feedback") return redirect(url_for('feedback.give_feedback')) else: return render_template('feedback/give-feedback.html', form=form, feedback_request=feedback_request)
def reply_to_feedback(id): form = FeedbackForm() feedback_request = get_or_404(LogEntry, id=id) if form.validate_on_submit(): feedback_request.entry.update( replied=True, details=form.feedback.data) flash("Saved feedback") return redirect(url_for('feedback.give_feedback')) return render_template( 'feedback/give-feedback.html', form=form, feedback_request=feedback_request)