Tweaked meetecho URLs, with new template string formatting filter.
- Legacy-Id: 11689
This commit is contained in:
parent
008f0d4e40
commit
523bfce86d
|
@ -335,7 +335,7 @@
|
|||
<!-- Video stream (meetecho) -->
|
||||
{% if item.timeslot.location.video_stream_url %}
|
||||
<a class="btn btn-default btn-xs"
|
||||
href="{{ item.timeslot.location.video_stream_url }}"
|
||||
href="{{ item.timeslot.location.video_stream_url|format:item.session }}"
|
||||
title="Meetecho video stream"><span class="fa fa-video-camera"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -16,3 +16,13 @@ def xslugify(value):
|
|||
lowercase. Also strips leading and trailing whitespace.
|
||||
"""
|
||||
return _xslugify(value)
|
||||
|
||||
@register.filter(is_safe=True)
|
||||
@stringfilter
|
||||
def format(format, values):
|
||||
if not isinstance(values, dict):
|
||||
tmp = {}
|
||||
for f in values._meta.fields:
|
||||
tmp[f.name] = getattr(values, f.name)
|
||||
values = tmp
|
||||
return format.format(**values)
|
||||
|
|
Loading…
Reference in a new issue