Re: Passing template variables within static template

61 views
Skip to first unread message

Laxmikant Gurnalkar

unread,
Oct 4, 2012, 11:17:33 AM10/4/12
to django...@googlegroups.com
Try,
<img src="{% static item.url  %}" width="100" height="100"/> 
cheers
L
On Thu, Oct 4, 2012 at 8:27 PM, Zoran Hranj <xzm...@gmail.com> wrote:
Hi guys,

basicly I want to do the following:

<img src="{% static "{{ item.url }}" %}" width="100" height="100"/>

But the "{{ item.url }}" part does not get evaluated. I understand why it is not evaualted, but I want to know if there is a filter or something to make it work like I want to (quick glance on the filter list didnt give me any ideas).

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/G8nMOFvfW9cJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
GlxGuru

Zoran Hranj

unread,
Oct 5, 2012, 4:02:41 AM10/5/12
to django...@googlegroups.com
Doh!

Thank you, sir!
Reply all
Reply to author
Forward
0 new messages