I use the following to show attached files in my Post (Django/Python):
{% 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 %}
Problem is, using {{i.file.name}} I see full url, is it possible to see just file name?
Attachment 1: PN_files/2022/02/14/file_name.xlsx
I would like:
Attachment 1: file_name.xlsx