class File(models.Model):
name = models.CharField(max_length=100)
file = models.FileField()
def index(request):
file = File.objects.all()
context = {'file':file}
return render(request, 'qwerty/index.html', context)
{% for i in file %}
<a href="{{i.file.url}}" target="blank">{{i.name}}</a>
{% endfor %}