Thursday, February 25, 2021

Re: SVG, clipPath, listview django.

On Wed, Feb 24, 2021 at 12:50:43AM -0800, Siarhei Siarhei wrote:
> Есть слайдер - файл "svg", картинки - "обтравка-clipPath"
>
> <image style="overflow:visible;" xlink:href="{% static
> 'index_radius/index_2_radius.jpg' %}" transform="matrix(0.9 0 0 0.9
> 139.9999695 -50.4106941)"></image>
> (image cont от 6 и более)
> Как же, это пропустить через - ListView?
> Надеюсь что кто то, с таким сталкивался...

(Google Translation from Russian below)
> There is a slider - "svg" file, pictures
>
> (image cont from 6 or more)
> How, then, can this be passed through - ListView?
> I hope that someone came across this ...

I'm assuming the "list" in ListView here is the list of 6 pictures.
Are the pictures stored in an ImageField of a Django model? If not,
that's your first step since ListView is designed to display a list
of django model objects.

On the other hand, if the pictures are static as it appears above {%
static...
...then you'll instead need to create a for loop in your template to
display the 6 pictures:

{% comment %}
from your view: context = {'picrange': range(6)}
{% endcomment %}
{% for picnum in picrange %}
<image style="overflow:visible;" xlink:href="{% static
'index_radius/index_{{ picnum }}_radius.jpg' %}" transform="matrix(0.9 0 0
0.9 139.9999695 -50.4106941)"></image>
{% endfor %}


This assumes that your images are sequential of the form
"index_[N]_radius.jpg"

Anyway, lots of assumptions here so replying with more detail would
defintely help.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20210225230744.GF19963%40fattuba.com.

No comments:

Post a Comment