@app.route('/subscribe/<request_id>', methods=['POST'])
def subscribe(request_id):
    email = request.form.get('update_email')
    if email:
        success = subscribe_to_sr(request_id, email)
        if (not success):
            flash('Please use a valid e-mail address.', 'error')
    return redirect(url_for('show_request', request_id=request_id))
@app.route('/subscribe/<request_id>', methods=['POST'])
def subscribe(request_id):
    email = request.form.get('update_email')
    if email:
        success = subscribe_to_sr(request_id, email)
        if (not success):
            flash('Please use a valid e-mail address.', 'error')
    return redirect(url_for('show_request', request_id=request_id))