How to create an individual results page using Flask?

from flask import Flask, render_template, redirect 
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def view_form(): 
  if request.method == "POST":

    # get user id to be able redirect to specific results page
    user_id = request.form.get('user_id')
    # redirect to page for exact user_id
    return redirect(url_for('view_results/' + user_id))

  return render_template('main.html')

@app.route('/results/', methods=['GET'])
def view_results(user_id=None):

  # Show an individual results according user_id
  if user_id == 'blahblah':
    return render_template('results_for_blahblah.html')
  # if user_id is None return a standard dummy results
  return render_template('results.html')