title: How to make a file which is on local server download-able over HTTP in python?
body: <p>Framework: Django
  Language: Python
  OS: Ubuntu</p>
  
  <p>For example, let us assume that I have a file "xyz.pdf" at "/home/username/project/". I have a webpage with download button. So if people click on that download button, the file xyz.pdf should be downloaded.</p>
  
  <p>What I have done,</p>
  
  <ol>
  <li>Created a webpage with download button with href as  "download/" (as you all know this url does not matter much)</li>
  <li>it is redirected to urls.py and finds the appropriate view say for example "xyzdownload"</li>
  <li>at xyzdownload I have following code,
  response = urllib2.urlopen('./project/xyz.pdf')
      html = response.read()</li>
  </ol>
  
  <p>The error I am getting is unknown url type: ./project/xyz.pdf</p>
  
  <p>Please let me know if you guys need more clarification.
  Thanks a lot</p>