title: Django - download file without reloading the page
body: <p>The flow looks like that:</p>
  
  <ol>
  <li>user is filling the form</li>
  <li>form is passed to the server by ajax</li>
  <li>form is saved to db, then the pdf with the form data is created and saved in the app folder (probably a bad move here...)</li>
  <li>ajax success causes the page to append a button 'Download' with value equal to current pdf's name so button 'Download' appears to the user</li>
  <li>If user presses the button the very pdf that was just saved is gonna download. </li>
  <li>Refreshing the page makes the button disappear.</li>
  </ol>
  
  <p>I've got stuck on point 5. I have created another ajax (to avoid reloading the page) bound to the Download button. It correctly asks the server to look for the file, creates a django File object: <code>pdf_file = File(open(file_path, 'rb'))</code>
  and creates a <code>HttpResponse</code> with file, and <code>content_type='application/pdf'</code> or <code>'application/download'</code>.
  <code>response['Content-Disposition']</code> is <code>attachment</code>.</p>
  
  <p>Then the ajax returns response - only it does not. Server raises no error but ajax error function is called.</p>
  
  <p>I've read that downloading with ajax is not possible. Could you help me a bit to get it straight? If above snippets are not clear, I shall provide more code.
  Python 3.5, Django 1.10</p>