Skip to content

Commit 523bfce

Browse files
committed
Tweaked meetecho URLs, with new template string formatting filter.
- Legacy-Id: 11689
1 parent 008f0d4 commit 523bfce

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

ietf/templates/meeting/agenda.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ <h4>Slides</h4>
335335
<!-- Video stream (meetecho) -->
336336
{% if item.timeslot.location.video_stream_url %}
337337
<a class="btn btn-default btn-xs"
338-
href="{{ item.timeslot.location.video_stream_url }}"
338+
href="{{ item.timeslot.location.video_stream_url|format:item.session }}"
339339
title="Meetecho video stream"><span class="fa fa-video-camera"></span>
340340
</a>
341341
{% endif %}

ietf/utils/templatetags/textfilters.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ def xslugify(value):
1616
lowercase. Also strips leading and trailing whitespace.
1717
"""
1818
return _xslugify(value)
19+
20+
@register.filter(is_safe=True)
21+
@stringfilter
22+
def format(format, values):
23+
if not isinstance(values, dict):
24+
tmp = {}
25+
for f in values._meta.fields:
26+
tmp[f.name] = getattr(values, f.name)
27+
values = tmp
28+
return format.format(**values)

0 commit comments

Comments
 (0)