title: Playing a wavefile from the html using flask framework?
body: <p>This is my run.py code</p>
  
  <pre><code>        from flask import *
  
          app = flask.Flask(__name__)
          app.config.from_object('config')                          
          @app.route('/', methods=['GET','POST'])
          def new_task():
              if flask.request.method == 'POST':
                 tts = flask.request.form['tts']
              if int(tts) == 3:
                 return redirect("/tts1")
              function()
                  flask.flash(str(tts)+'is being selected')
                     print str(tts)+"output"
              else:
                 flask.flash('Parakrant ----&gt;')
                  return flask.render_template("tasks.html")
              return redirect('/') 
      @app.route('/tts1')
      def wav():
          print "wavfile reached"
          return flask.render_template("s1.html")
  </code></pre>
  
  <p>This my base.html file</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;names&lt;/title&gt;
        &lt;/head&gt;
        &lt;body&gt;
          &lt;div&gt;PS: &lt;a href="/ps"&gt;Home&lt;/a&gt;&lt;/div&gt;
          &lt;hr&gt;
          {% block content %}{% endblock %}
        &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>this my tasks.html</p>
  
  <pre><code>  {% extends "base.html" %}
    {% block content %}
    &lt;div class="page"&gt;
    &lt;table&gt;
    &lt;tr&gt;
    &lt;form action="{{ url_for('new_task') }}" method="POST" class=new-task&gt;
   &lt;/tr&gt;
    &lt;tr&gt;
     &lt;td&gt;
     &lt;label&gt;name :&lt;/label&gt;
    &lt;select name="name" width="100px"&gt;
     &lt;option value="1"&gt;name1&lt;/option&gt;
    &lt;option value="2"&gt;name2&lt;/option&gt;
     &lt;option value="3"&gt;name3&lt;/option&gt;
    &lt;option value="4"&gt;name4&lt;/option&gt;
    &lt;option value="5"&gt;name5&lt;/option&gt;
     &lt;/select&gt;
    &lt;/td&gt;
     &lt;td&gt;
     &amp;nbsp;
     &amp;nbsp;
      &lt;input class="button" type="submit" value="Press"&gt;
     &lt;audio controls&gt;
     &lt;source src="ps.wav" type="audio/wav"&gt;
    &lt;/audio&gt;
     &lt;/td&gt;
      &lt;/form&gt;
     &lt;/tr&gt;
    &lt;/table&gt;
     &lt;/div&gt;
     &lt;/table&gt;
   {% endblock %}
  </code></pre>
  
  <p>This my s1.html</p>
  
  <pre><code>    {% extends "base.html" %}
      {% block content %}
        &lt;div class="page"&gt;
        &lt;table&gt;
        &lt;tr&gt;
        &lt;form action="{{ url_for('new_task') }}" method="POST" class=new-task&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        &lt;td&gt;
        &lt;label&gt;name :&lt;/label&gt;
        &lt;select name="name" width="100px"&gt;
        &lt;option value="1"&gt;name1&lt;/option&gt;
        &lt;option value="2"&gt;name2&lt;/option&gt;
        &lt;option value="3"&gt;name3&lt;/option&gt;
        &lt;option value="4"&gt;name4&lt;/option&gt;
        &lt;option value="5"&gt;name5&lt;/option&gt;
        &lt;/select&gt;
        &lt;/td&gt;
        &lt;td&gt;
        &amp;nbsp;
        &amp;nbsp;
        &lt;input class="button" type="submit" value="Press"&gt;
        &lt;audio controls&gt;
          &lt;source src="ps.wav" type="audio/wav"&gt;
        &lt;/audio&gt;
        &lt;/td&gt;
        &lt;/form&gt;
         &lt;/tr&gt;
         &lt;/table&gt;
         &lt;/div&gt;
         &lt;/table&gt;
      {% endblock %}
  </code></pre>
  
  <p>In the s1.html i have a hyperlink to a audio wav file . I want to play the audio file from the s1.html. The wav file is present in the root directory.<br>
  It is throwing error</p>
  
  <blockquote>
    <p>GET /ps.wav HTTP/1.1" 404 
    Please tell how to solve this. Help will be highly appreciated! </p>
  </blockquote>