What you are trying to do is very unusual, and any solution to exactly what you
are asking is going to be an ugly hack. So, why do you want to do this? What are
these static files that you have in mylist?
On 16/06/2022 14.09, luca72.b...@gmail.com wrote:
Hello i have a list like:
mylist = ['
On Thu, Jun 16, 2022 at 4:09 AM luca72.b...@gmail.com
wrote:
>
> Hello i have a list like:
> mylist = ['1,png','2.png',3.jpj']
> in the template i do as follow:
> {% for o in mylist %}
>
> {% if "png" in o %}
> {{ o }}
>
> {% else %}
> {{o}}
>
Don use 'o' as a template variable in the template function
Use {% static 'poll/'|add:o %} instead.
16 Haz 2022 Per 14:09 tarihinde luca72.b...@gmail.com <
luca72.bertolo...@gmail.com> şunu yazdı:
> Hello i have a list like:
> mylist = ['1,png','2.png',3.jpj']
> in the template i do as follow:
Hello i have a list like:
mylist = ['1,png','2.png',3.jpj']
in the template i do as follow:
{% for o in mylist %}
{% if "png" in o %}
{{ o }}
{% else %}
{{o}}
{% endif %}
{% endfor %}
in the template i see the file name
4 matches
Mail list logo