title: Django, How to Download a Docx file, or any file in general
body: <p>My current website creates and saves a Docx file to the server based on the the current users inputs/information.  I have the program saving it to the server, so the user can access it later.  So I am assuming the docx file can be considered static?  Well anyways, I am having trouble getting the download to work. </p>
  
  <p>I have looked at many different threads on how to get a Docx to download and none have worked for me so far.
  1.  <a href="https://stackoverflow.com/questions/19400089/downloadable-docx-file-in-django">Downloadable docx file in Django</a>
  2.  <a href="https://stackoverflow.com/questions/22356496/django-create-odt-or-docx-documents-to-download">Django create .odt or .docx documents to download</a>
  <a href="https://stackoverflow.com/questions/23821352/generate-the-ms-word-document-in-django">Generate the MS word document in django</a></p>
  
  <p>The closest I have gotten, was a docx file that downloaded, but the content was the path and not the actual docx file that I wanted.  Hoping someone can help, Thanks. </p>
  
  <p>Code:</p>
  
  <pre><code>response = HttpResponse('docx_temps/extracted3/test.docx', content_type='application/vnd')
  response['Content-Disposition'] = 'attachment; filename=test.doc'
  return response 
  </code></pre>
  
  <p>Code for Link, Still cannot get it to work. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Download&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;a href="users/Tyler/Desktop/Django_Formatically/mysite/Formatically/docx_temps/extracted3/test.docx"
    download="Test.docx"&gt; 
     Test.docx
  &lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>