Re: SVG, clipPath, listview django.

27 views
Skip to first unread message
Message has been deleted

Ryan Nowakowski

unread,
Feb 25, 2021, 6:08:29 PM2/25/21
to Django users
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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages