Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Use filename insted of 'Download'

On my Django page I have a paragraph to download attached files:

{% for i in post.file_set.all %}<p class="article-content mt-2 mb-1"><strong>Attachment {{ forloop.counter }}: </strong><a href="{{i.file.url}}" >Download</a></p>{% endfor %}

How can I show File name insted of word 'Download'. Users don't know which file is which when downloading, in case of many files. Also, if extension is possible.

So, insted of:

Attachment: Download

I would like to have:

Attachment: image.png
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just replace Download with {{i.file.name}}

{% for i in post.file_set.all %}<p class="article-content mt-2 mb-1"><strong>Attachment {{ forloop.counter }}: </strong><a href="{{i.file.url}}" >{{i.file.name}}</a></p>{% endfor %}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!