I am getting all file names under directory dir: 
files = os.listdir(dir)
and after rendering file names to template, i am showing them in template like this:
{% for each in files %}
<li>
  <a href="{{each}}" target="_blank">{{each}}</a>
<li>
{% endfor %}
I want that If i click on filename, the file should be opened in new window. but here the problem is that files = os.listdir(dir) returns only file names and not its relative path. how do i get the path also?  
<a href="{{path}}/{{each}}" ...C://...but i need the relative path