I am trying to replicate Felix Holzmeister's MPL game from
The error I get when running it in oTree 5 is the following:
Unrecognised filter name 'stringformat:"s"'
The full code for that portion is below.
{% for i,f,p in choices %}
<tr>
<td class="pie-chart">
{% with j=i|stringformat:"s" %}
{% with pies_a="pie_a_"|add:j %}
<div id="{{ pies_a }}" class="pie-chart"></div>
{% endwith %}
{% endwith %}
</td>
<td class="pie-chart">
{% with j=i|stringformat:"s" %}
{% with pies_b="pie_b_"|add:j %}
<div id="{{ pies_b }}" class="pie-chart"></div>
{% endwith %}
{% endwith %}
</td>
</tr>
<tr>
<td class="center">
<button name="{{ f }}" value="A" class="btn btn-primary">
{% trans "Option A" %}
</button>
</td>
<td class="center">
<button name="{{ f }}" value="B" class="btn btn-primary">
{% trans "Option B" %}
</button>
</td>
</tr>
{% endfor %}