title: How to play a audio file through http response in django(python)
body: <p>I want to make request to url  and django view should read the file and send the http response back to play the same file in browser.I got the following code but it does't play anything please anyone help me..
  Right now i hard coded  the file name in the code.</p>
  
  <pre><code>url: http://localhost/playfile/audiofile_name
  def playAudioFile(request): 
      try:
          fname="C:\\test\\audio\\t.mp3"    
          wrapper = FileWrapper(file(fname))
          print content_type
          response = HttpResponse(wrapper, content_type="audio/mpeg")
          print response
          response['Content-Length'] =os.path.getsize(fname )
          return response
      except:
          return HttpResponse()
  </code></pre>
  
  <p>Thank in advance..</p>