title: Return button in flask
body: <p>I'm learning to use Flask but I did not found a &quot;easy solution&quot; (by &quot;easy solution&quot; I mean easy for my noob level, few codes line) for this so I'm asking here for help.</p>
  <p>How I can create a &quot;back&quot; button on the new generated page in flask?</p>
  <p>This is my code:</p>
  <p>calculator.py</p>
  <pre><code>from flask import Flask, request, render_template
  
  app = Flask(__name__)
  
  @app.route(&quot;/&quot;)
  def my_form():
      return render_template(&quot;calc.html&quot;)
  
  @app.route(&quot;/&quot;, methods=['POST'])
  def my_form_post():
      num_1 = request.form['Number 1']
      num_2 = request.form['Number 2']
      result = int(num_1) + int(num_2)
      render = render_template(&quot;calc_result.html&quot;)
      #return render_template(&quot;calc_result.html&quot;)
      return &quot;The result from &quot; + str(num_1) + &quot; plus &quot; + str(num_2) + &quot; is: &quot; + str(result) + &quot;.&quot;
  
  
  app.run(host='127.0.0.1', port=5000)
  
  </code></pre>
  <p>calc.html</p>
  <pre><code>&lt;html&gt;
      &lt;body&gt;
  
      &lt;form method = &quot;POST&quot;&gt;
      &lt;input name = &quot;Number 1&quot;&gt;
      &lt;input name = &quot;Number 2&quot;&gt;
      &lt;input type = &quot;submit&quot;&gt;
      
      &lt;/body&gt;
  &lt;/form&gt;
  </code></pre>
  <p>The code is working, is receiving the numbers and doing the math but the problem is, I'm not able to generate a &quot;back&quot; button in the new generated page with the result.</p>
  <p>If I put for example 10 + 10 in the calc.html, I will receive:</p>
  <blockquote>
  <p>The result from 10 plus 10 is: 20.</p>
  </blockquote>
  <p>I would like to put a &quot;back&quot; button on this page or learn how to generate a new button in the new gelerated page, so I would receive something like:</p>
  <blockquote>
  <p>The result from 10 plus 10 is: 20.</p>
  </blockquote>
  <blockquote>
  <p>Back</p>
  </blockquote>
  <p>Sorry the english.</p>
  <hr />
  <p>Edit:</p>
  <p>This is what user see on the first page:</p>
  <p><a href="https://i.stack.imgur.com/xkt0F.png" rel="nofollow noreferrer">What user see in first page</a></p>
  <p>After put the two numbers to sum, they see:</p>
  <p><a href="https://i.stack.imgur.com/SBVWt.png" rel="nofollow noreferrer">Result page</a></p>
  <p>I want allow user to come back to first page and be able to do another sum.</p>
  <p>In both pages the link are the same: <a href="http://127.0.0.1:5000/" rel="nofollow noreferrer">http://127.0.0.1:5000/</a></p>