title: keeping forms data in url with flask
body: <p>Despite looking at URL building howtos with Flask, I couldn't figure out a way to keep form data in url.</p>
  
  <p>This code works fine :</p>
  
  <pre><code>@app.route('/', methods=['GET'])
  def index():
      res = '''&lt;form action="/search" method=post&gt;
                      &lt;p&gt;&lt;input type="text" name="query" value="test"&gt;&lt;/p&gt;
                      &lt;p&gt;&lt;input type="submit" value="Search"&gt;&lt;/p&gt;
                      &lt;br /&gt;
      &lt;/form&gt;'''
      return res
  
  @app.route('/search', methods=['POST'])
  def search():
      return request.form['query']
  </code></pre>
  
  <p>But results are displayed on <code>myapp.com/search</code> while <strong>I would like something like <code>myapp.com/search?query=toto</code></strong></p>
  
  <p>I must have missed something pretty basic I guess... Any hint ?</p>
  
  <p>Thanks in advance</p>