title: Download local file link in html django template
body: <p>Basically I have a django template from which I show data about a document and I want a link to download the file. I tried something like this but it is not working:</p>
  
  <pre><code>&lt;div class="metadata-container"&gt;
          &lt;div class="metadata-title"&gt;
              &lt;div&gt;Version&lt;/div&gt;
              &lt;div&gt;Author&lt;/div&gt;
              &lt;div&gt;File&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="metadata-content"&gt;
              &lt;div&gt;{{ document.version }}&lt;/div&gt;
              &lt;div&gt;{{ document.author }}&lt;/div&gt;
              &lt;a href=document.file download&gt;&lt;div&gt;{{ document.file }}&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>The filename in format '/documents/2017/filename.txt' is in document.file variable or however it's called. How can I use it in the  ? or how can I make it work?</p>