Regarding rendering templates query

22 views
Skip to first unread message

Karthiki Chowdary

unread,
May 25, 2020, 11:10:47 AM5/25/20
to Django users
Hi,
 
 I have a query in in templates i was a beginner in django and python. Please help me out in this query .
 
For suppose i have a buttons on client browser like SKINCARE or HAIR CARE products if i click on that buttons it should display the logos of skin care products or hair care products. Rendering a single image is very easy if i want to render so many images how can i do that if yes with dictionaries how can i do that?? is this possible to render such huge amount of images or logos ?

thanks 

Kartheeki. 

Please help me out .

Joe Leger

unread,
May 25, 2020, 1:21:57 PM5/25/20
to Django users
Where you are rendering a single image, instead use a for loop to render all of your images like so:
{% for image in images %}
    <img src="{{ url 'image' }}" />
{% endfor %}

Karthiki Chowdary

unread,
May 25, 2020, 8:18:10 PM5/25/20
to django...@googlegroups.com
Okay I will try thankyou

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/v00ENJFujtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/079939dd-0c8d-460a-862c-c8f5b2cf7494%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages