def comments(case_id):
    """Upload a new comment."""
    text = request.form['text']
    variant_id = request.form.get('variant_id')
    username = request.form.get('username')
    case_obj = app.db.case(case_id)
    app.db.add_comment(case_obj, text, variant_id=variant_id, username=username)
    return redirect(request.referrer)
Upload a new comment.