title: How do I get my button to redirect to a different website when pressed?
body: <p>I have been trying to get my button to redirect to this website when clicked, the first button works but whenever I press the second button it tells me the browser sent a request that it could not understand</p>
  <pre><code>@app.route('/fetch/contract')
  def contract_page():
      return redirect(&quot;https://rinkeby.etherscan.io/token/0x01be23585060835e02b77ef475b0cc51aa1e0709?a=0xffcd77dfe5a79a63927f239ec15f464069c984c1&quot;)
  
  
  @app.route('/fetch', methods=['GET', 'POST'])
  def fetch_page():
      if request.method == 'POST':
          if request.form['fetch'] == 'Fetch':
              data = &quot;https://7lsz2q3ku0.execute-api.us-east-1.amazonaws.com/items&quot;
              return display_data(data)
          elif request.form['address'] == 'Contract':
              return redirect(url_for('contract_page'))
  
      else:
          return render_template(&quot;fetch.html&quot;)```
  </code></pre>