title: Backend Flask not redirecting after query
body: <p>I'm making a page where the user selects elements, confirms his choice, the data is then sent to the backend, and a .csv is made.
  After the file is created I want the user to be redirected to a page where he can download the file, however</p>
  <pre><code>return render_template(&quot;tools/downloadfile.html&quot;, document=name)
  </code></pre>
  <p>doesn't redirect the user to that page, or any other.
  There isn't any error in the console, the file is created, but the is no redirection to the page.
  Do you have any idea of what could cause this ?</p>
  <pre><code>@app.route('/createdocument', methods=['POST', 'GET'])
  #@login_required
  def create_document():
      playlists = get_playlists()
      if request.method == &quot;POST&quot;: 
          request_data = str(request.data.decode('UTF-8'))
          genre = get_header_genre(request_data)
          parsed_data = parse_request(request_data)           
          playlist_names = get_parsed_playlists(parsed_data)
          if genre == &quot;playlist&quot;:
              #make_playlist_doc(playlist_names, genre)
              print(&quot;playlist option not ready yet&quot;)
          elif genre == &quot;socan&quot;:
              name = make_socan_doc(playlist_names, genre)
              return render_template(&quot;tools/downloadfile.html&quot;, document=name)
          else:
              print(&quot;other request:&quot;)
              print(str(request.data.decode('UTF-8')))
      return render_template(&quot;tools/createdocument.html&quot;, playlists=playlists)
  
  </code></pre>