title: Redirect to other view after submitting form
body: <p>I have a survey form.  After submitting the form, I'd like to handle saving the data then redirect to a &quot;success&quot; view.  I'm using the following code right now, but it just stays on the current url, while I'd like to go to <code>/success</code>.  How can I do this?</p>
  <pre><code>@app.route('/surveytest', methods=['GET', 'POST'])
  def surveytest():
      if request.method == 'GET':
          return render_template('test.html', title='Survey Test', year=datetime.now().year, message='This is the survey page.')
      elif request.method == 'POST':
          name = request.form['name']
          address = request.form['address']
          phone = request.form['phone']
          email = request.form['email']
          company = request.form['company']
          return render_template('success.html', name=name, address=address, phone = phone, email = email, company = company)
  </code></pre>