title: Redirect back in Flask
body: <p>I have a DB Table called Item. Item has a <code>status</code> attribute, that can be either of</p>
  
  <pre><code>new
  todo
  doing
  done
  </code></pre>
  
  <p>On my website I have two views showing tables of Item. </p>
  
  <ul>
  <li>View 1 shows <strong>all</strong> Items (with a status column).</li>
  <li>View 2 <strong>only</strong> shows Items with the status <code>todo</code>.</li>
  </ul>
  
  <p>Depending on the Item status, there are certain actions a user can perform ("move to todo", "move to doing", "move to done").</p>
  
  <p>If you consider View 1 and View 2, they both have in common that they contain items with the status <code>todo</code>. So on both I have a Button linking to a URL called </p>
  
  <pre><code>/Item/&lt;id&gt;/moveToDoing
  </code></pre>
  
  <p>where id - Item's status is set to "doing".</p>
  
  <p>Now I want the user to be redirected back to where he clicked the button (View 1 or View 2).</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How to do this with Flask? I feel
  <a href="http://flask.pocoo.org/snippets/62/" rel="noreferrer">http://flask.pocoo.org/snippets/62/</a> is not quite what I need,
  because I have no POST request with a formular here. (should I?)</li>
  <li>Am I doing this the right way or is there a convention on how to normally solve that?</li>
  </ol>